Open anupekshajain opened 2 years ago
You need to include screenshots of what you are picking up in the inspector and your code used to identify the element if you'd like help with this issue.
Here are the snaps of Inspector, UI Recorder & Accessibility Insights tool, The hierarchy displayed in UI Recorder & Accessibility Insights is not displayed in the Inspector tool. And the properties displayed in the inspector with that also it is unable to locate element.
Below is the code snippet I am using -
WindowsDriver
And this is the exception I am getting -
2022-04-01 11:19:30 [main] INFO :: exceptionAn element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'BLR-763F163-L', ip: '192.168.1.103', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1' Driver info: io.appium.java_client.windows.WindowsDriver Capabilities {app: Root, javascriptEnabled: true, platform: WINDOWS, platformName: Windows} Session ID: 2D2BC898-7726-440C-835A-18E74F17F363 *** Element info: {Using=name, value=Actions-0} Hopefully this will make my question clear.
I had the similar issue. But I used Robotframework Zoomba library to write my test cases. So here is the advice: Since there are two windows first one is root(i.e "Practie Management System...") and the second one is with your menu list. So first try to switch to the second window(i.e. "Client Details: J00006 - Jennifer Jones") and then you will find the element which you are trying to access. Later, you have to switch back to the main window.
Thanks for the reply @aliahmadbutt4 . But we already were on the clients window where we were unable to locate the element, so is the Root [Desktop session] is coming into picture, but that too did not work yet.
Most of the time inspect.exe is what you can see with WinAppDriver. https://github.com/microsoft/WinAppDriver/issues/755
I'd say stop trying to find the second element from within the first element, just do an xpath query DesktopSession.FindElement(By.XPATH('//MenuItem[@Name="QuickLetters"]')).click() I've found that as much as you think appium would like to be fed the first element and then search within that element, it just doesn't work out that way. I've sped up and eliminated a lot of random failures looking in tables this way. Menu Items should be similar
I am trying to automate our desktop application using Winappdriver [with Java]. There is a ultra menubar in the application whose attributes are identified by inspector tool, UI recorder and even accessibility insights. But when I try to locate it in my script it fails saying that no element found with the given parameters.
One thing that I observed is that even though the inspector identifies the attributes of this ultra menu bar and its submenu, it is not displayed in the tree structure under Root in the left pane.
I need help on how to locate such elements as my scripts are struck due to this.
I tried creating a desktop session and searched the element in the Root node after waiting for 10-40 seconds but it is not listed in the Page source itself.