-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Find Element By XPATH is not working on MS Word using AppiumForMac #86
Comments
Have you tried it using a webdriver wait? Hopefully this was of any help. |
@miksch123 can you please give working code example of your wait? I am also experience same issue. |
new WebDriverWait(driver, TimeSpan.FromSeconds(20)).Until(X => X.FindElement(By.XPath("element/you/found/using/afm"))); Here you go. This is a c# example as I am using that mainly. |
Thank you. I will have to try this out.
Joseph
…On Fri, Nov 6, 2020, 11:49 PM miksch123 ***@***.***> wrote:
new WebDriverWait(driver, TimeSpan.FromSeconds(20)).Until(X =>
X.FindElement(By.XPath("element/you/found/using/afm")));
Here you go. This is a c# example as I am using that mainly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHU7LHLY2GPFRNM7XYICYJLSOT3XZANCNFSM4MYXSL4A>
.
|
did you get this working Joseph? |
Probably as there is no response that it didn't work. |
Hi, I am getting "No such element" error with findElementByXpath for Word app.
I have used absolute xpath generated by AFM:
driver.findElementByXPath("/AXApplication[@AXTitle='Word']/AXWindow[@AXTitle='Open new and recent files' and @AXIdentifier='DocStage' and @AXSubrole='AXStandardWindow']/AXButton[@AXTitle='Create' and @AXIdentifier='_NS:73']").click();
xpath is working fine for other apps like calculator and Notes app.
This issue is only with Word and other O365 apps.
Mac OS : Mojave
AFM Beta 3
Can anyone help me on this. Thanks in advance.
Appium logs:
[Appium4Mac] [STDERR] ************* findAllUsingAbsoluteAXPath: /AXApplication[@AXTitle='Word']/AXWindow[@AXTitle='Open new and recent files' and @AXIdentifier='DocStage' and @AXSubrole='AXStandardWindow']/AXButton[@AXTitle='Create' and @AXIdentifier='_NS:73']
[Appium4Mac] [STDERR] 2020-05-04 18:12:26.661 AppiumForMac[7620:212337] axPathComponents:(
[Appium4Mac] [STDERR] "AXApplication[@AXTitle='Word']",
[Appium4Mac] [STDERR] "AXWindow[@AXTitle='Open new and recent files' and @AXIdentifier='DocStage' and @AXSubrole='AXStandardWindow']",
[Appium4Mac] [STDERR] "AXButton[@AXTitle='Create' and @AXIdentifier='_NS:73']"
[Appium4Mac] [STDERR] )
[Appium4Mac] [STDERR] 2020-05-04 18:12:26.676 AppiumForMac[7620:212337]
[Appium4Mac] [STDERR] ************* findAllUsingAbsoluteAXPath matchedNodes:(
[Appium4Mac] [STDERR] )
[Appium4Mac] [STDERR]
[Appium4Mac] [STDERR]
[WD Proxy] Got response with status 200: {"status":7,"sessionId":"PLvdlCm2","value":{"message":"An element could not be located on the page using the given search parameters."}}
[WD Proxy] The response has an unknown format
[W3C (27549f78)] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: The request to /wd/hub/session/27549f78-1868-4a49-8a41-b98f2044630d/element has failed
[W3C (27549f78)] at JWProxy.proxy (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:213:13)
[MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
[HTTP] <-- POST /wd/hub/session/27549f78-1868-4a49-8a41-b98f2044630d/element 404 5010 ms - 771
The text was updated successfully, but these errors were encountered: