New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does WinAppDriver supports XPATH AXES with MobileElement::findElement(By)? #1975
Comments
The answear is simple. Second search have access to entire dom so it finds element, first search have only access to current element and its child elements so it doesn't see siblings at all. |
@HowTurnRight Thanks for your speedy reply! Do you mean I will have the same behavior using ChromeDriver and Selenium for example? If so, then I have to close the issue... |
I dont know about other driver implementations but this one seems to be logical and correct behavior. |
@HowTurnRight I have checked how Selenium and ChromeDriver works. It does find siblings when using I think this behavior should be considered as a defect. I'm questioning whether this is well know behavior of WinAppDriver, or maybe I have encountered into some specifics, which maybe can be fixed somehow. Of course it is possible to not use |
@anunay1 Hello! Would it be possible for you to confirm if I'm on the right track? |
@VladislavShcherba |
I have encountered a problem that
MobileElement
's methodfindElement(By)
does not work when using with XPATH AXES.For example,
rootElement.findElement("./following-sibling::*")
always throws
NoSuchElementException
, although I am sure that the element exists.I have also checked
AppiumDriver<MobileElement>
version of that method like this:driver.findElement(byXPath("//*[@RuntimeId='<root-element-id-here>']/following-sibling::*"))
which results in the element I have expected.
I am using Java language binding. I checked the issue for the application we are automating on our project, and also for standard Windows 10 calculator.
Could you please suggest me based on your experience, can it be specifically problem of mine applications under test? Or maybe the issue is wider and exists for Java language binding. Or it exists for all languages, so let's say it is WinAppDriver server part problem? Thanks!
The text was updated successfully, but these errors were encountered: