WinAppDriver
WinAppDriver copied to clipboard
Taking More time to identify the UI elements
Identifying the Elements in Webex Apllication is taking more time , for each element it is taking minimum of 15 seconds to 30 seconds. Can you guys please help me on this.
Regards, Karthikeyan
Karthikeyan021298 Could you please post an example What type of locators are you using (low speed of XPath search is a known issue)?
Solutions:
- Use id for search controls
- Use relative XPath: create container control and search inside it child controls
- Use controls caching
Hi @Shakevg, I have been trying to automate the "WebEx" application, It was working fine without any time delay to find the elements in previous WebEx version(42.4.1.22032 ), but when the "WebEx" got upgraded to (42.5.0.22221) version I found the time delay in finding the Elements. I used "AccessibiltyId" attribute to find the Elements and I have tried the relative XPath with contains method Eg: (WebexSession.findElementByXPath("//*[contains(@Name,' Call')]").click();), but I am still facing the issue. For getting the "Pagesource" of the application it is taking more than 2 minutes of time. I have attache the code that I have been using in this comment , can you please help me to overcome this issue.
Thank you. Regards, Karthikeyan
Karthikeyan021298 I don't know the way to increase speed. Usually it depends on app xml structure (if it is complecated then speed became slower). You can just try to search control not in full app but in some container if it is possible:
WebElement container = WebexSession.findElementByAccessibilityId("conteinerID");
System.out.println("Started searching Text Field @ "+new Date());
WebElement searchorDial = container.findElementByAccessibilityId("MainWindowClass.ConversationsForm.topLevelStack.mainAreasWidget.rightSideStack.CallHistoryView.rightHandSide.dialpadView.frame.dialTextField.textInput");
System.out.println("Found and Text field @ "+new Date());
searchorDial.sendKeys("9725987087");
System.out.println("Started searching Audio Call @ "+new Date());
container.findElementByAccessibilityId("MainWindowClass.ConversationsForm.topLevelStack.mainAreasWidget.rightSideStack.CallHistoryView.rightHandSide.dialpadView.frame.audioButtonLayout.startAudioCallButton"
).click();
@Shakevg Sure, I will try. I am having one question, if the Application's CPU utilization percenatage is high does it affects the Automation ?
@Shakevg Sure, I will try. I am having one question, if the Application's CPU utilization percenatage is high does it affects the Automation ?
I don't have the right answer, but I suppose it depends on the percentage of CPU utilization and behavior the same as for any other software. Very high CPU utilization (>85%) can slow down the execution.