Hi John/All,
I am working on web application which has a date picker when it comes to mobile devices so the code which work on desktop browser does not work for device.
I tried finding the date picker properties using UIAutomator and found that the class of date picker element is :- android.widget.DatePicker.
But when I try to enter value using getDriver().findElement(By.xpath("//android.widget.DatePicker[@index='0']")).sendKeys("Oct"), I am getting error as unable to locate element.
I did some goggling and suspecting that it might be because my application is running in webview mode and date picker is a mobile native element so I might need to change context to native but in page object class I am unable to do it.
"getDriver()" does not have "getContextHandles()" method.
Could you please help me out. How I can change context.
Serenity properties file :-
webdriver.driver= appium
appium.platformName = Android
appium.platformVersion = 6.0.1
appium.deviceName = "deviceName"
appium.browserName = Chrome
Thanks,
Lovesh Jain