We have a working automation for web app that sets a date on desktop. We need to do the same for the same web app on iOS.
The code that works on desktop:
isn’t working on iOS. Nothing is happening after clicking the field or trying to set the text ‘01/01/1980’ even though those steps are shown as completed (the script just keeps executing until some element that is expected to be found later is not found).
On the simulator, after manually clicking on the field, manual setting the date visually looks like this, which is totally different from what is going on desktop:
As for what’s going “behind the scene”, we have no idea cause we’ve only been able to partially run our automation (developed for web app on desktop) by using Remote and
is not working to examine the source.
I don’t test on mobile, however, when I click on any date field in my app, a Date GUI appears, and basically stops all data entry on any field underneath the Date GUI. I was able to get around this by not clicking on the date field, but just inserting the date, and then clicking on a textbox or label field above or below the Date GUI. Clicking on the field outside of the Date GUI has the Date GUI disappear. Hope it helps.
Mobile.click(findTestObject('myPage/input_Basic.LastName')) // a field above the Date GUI
Notice no click on the Date GUI.
Edit: I also changed the variable from “…TheDateFiled” to “…TheDateField”
iOS devices have a native date picker that makes it easy to select and set a date in any web application. To set a date, first open the app, then select the date picker option. Once you have selected it, choose the date you wish to set and confirm that selection. Finally, once the date is confirmed, the application will update and save your changes. And I noticed the same with other app development california , you recognize that not the structure of the headphones so to speak, sometimes OS 10 Offline.
@halenawinder, it’s an exellent solution to set a date manually ))
The question is how to do it in the automation script developed for web app (i.e. the script uses WebUI. … not Mobile. … built-in keywords and the script never starts any mobile app, just the Safari browser over Remote is started automatically by Katalon) when the data picker doesn’t seem to be interact with the script (i.e. nothing is hapenning after clicking on it or after sending keys to it or trying to set text )