-
Notifications
You must be signed in to change notification settings - Fork 140
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
XPath locator for Edit box is not working #341
Comments
@smtripathi99 maybe try with WADUIRecorder. You might be able to you automationid and use it as the id in winnium |
Please provide the URL to download WAD UIRecorder |
I have got the source for UI Recorder https://github.com/microsoft/WinAppDriver/tree/master/Tools/UIRecorder/UIRecorder. |
You can get it from https://github.com/microsoft/WinAppDriver/releases/tag/UiR_v1.0-RC |
Thanks i can run it now and see the xpath but code mention under C# is not working. Unable to find element comes |
Did you try using id or name instead of xpath. From the UI recorder you can use the "automation id" as the id in your code and "Name" as the name below |
Automation id seems to be dynamic and name also does not work. Following is what i got "/Pane[@name="Desktop 1"][@classname="#32769"]/Window[@name="Travel Network"][@classname="SWT_Window0"]/Pane[@classname="SWT_Window0"]/Pane[@classname="SWT_Window0"]/Pane[@classname="SWT_Window0"]/Pane[@classname="SWT_Window0"]/Edit[@name="Password"][@classname="Edit"]" |
Hi,
I have a window application and I am trying to locate Password filed using xpath but it is not working. I tried followings:
driver.findElement(By.xpath("/[contains(@ControlType,'ControlType.Window') and contains(@name,'Sabre Travel Network')]//[contains(@ControlType,'ControlType.Edit') and contains(@name,'Password')]"));
driver.findElement(By.xpath("//[contains(@classname,'SWT_Window0') and contains(@name,'Travel Network')]//[contains(@ControlType,'ControlType.Edit') and (@name='Password')]"));
driver.findElement(By.xpath("//[contains(@processid,'sabrered') and contains(@name,'Travel Network')]//[contains(@ControlType,'ControlType.Edit') and (@name='Password')]"))
The text was updated successfully, but these errors were encountered: