microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.41k forks source link

Unable to automatically scroll/move an element, which is not in view by findElementByAccessibilityId() #1039

Open angad16 opened 4 years ago

angad16 commented 4 years ago

I am trying to automate Microsoft Store and while doing so , i want to scroll to an element which is currently not in view , i tried using findElementByAccessibilityId of an app and i am able to find it but it doesn't gets clicked or scrolled to that element Error : org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameter

if (driver.findElementsByName("Maximize Microsoft Store").size() > 0) { driver.findElementByAccessibilityId("Maximize").click(); }

    WebElement ele = driver.findElementByAccessibilityId("9PB2MZ1ZMB1S"); // this is the id of itunes app which is not in view 

Can you please help me ?

anunay1 commented 4 years ago

which version of win app driver are u using

angad16 commented 4 years ago

Hi @anunay1 , i am using v1.1

anunay1 commented 4 years ago

trying adding some delay before you try to click

angad16 commented 4 years ago

it is working the same @anunay1

naeemakram commented 4 years ago

What type of application are you testing? UWP, WinForms, or WPF?