I am trying to assert a certain Text element is present on a GUI I am testing. I can see the element using Inspect, yet when running my code, the element is not found. Interestingly, I cant use the "watch cursor" to select the element, I can only select it from the tree. Here is an image of the Inspect window displaying the element I am trying to assert is present: Inspect Image
I've tried asserting the Parent element is there so I know my XPath is okay. I've tried finding all children by appending /* to the path, and this seems to return null.
Heres the part of my test code I am trying:
string xpath_ABLRegion_child = "//*/Custom[@ClassName=\"D3NodeOverview\"]/Text[9]"]";
var WinElem_ABLRegion_child = desktopSession.FindElementByAbsoluteXPath(xpath_ABLRegion_child);
Assert.IsTrue(desktopSession.FindElementByAbsoluteXPath(xpath_ABLRegion_child"]").Displayed);
Console.WriteLine($"Text of WinElem_ABLRegion_child is {WinElem_ABLRegion_child.Text}");
I expect the test to pass, as WinElem_ABLRegion_child
is displayed. However, I am getting an error that the element cant be found.
Please let me know if there is any more information I can share to help you help me.