What if you don't include noReset option of desired capabilities?
By default this capability is set to false.
desired_caps = {
'platformName': 'android',
'udid': 'emulator-5554',
'deviceName': 'Pixel 2 API 28',
'platformVersion': '9.0',
'appPackage': 'com.flipkart.android',
'appActivity': 'com.flipkart.android.activity.HomeFragmentHolderActivity'
}
driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_caps)
So what exactly it does that if noReset is set to false, each time your test select capabilities, it will clear the cache, data for the application under test.
Lets take an actual test scenario of flipkart app. If user want to land on home screen, they have to first select the language, enter number or skip the page and then user is landed on home screen.
Select Language |
Enter Number |
On HomeScreen |
If noReset : true, It will not clear the cache, data and user is landed on home screen. So selecting language and entering contact number would be a one time activity in this case.
desired_caps = {
'platformName': 'android',
'udid': 'emulator-5554',
'deviceName': 'Pixel 2 API 28',
'platformVersion': '9.0',
'noReset': 'true',
'appPackage': 'com.flipkart.android',
'appActivity': 'com.flipkart.android.activity.HomeFragmentHolderActivity'
}
driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_caps)
On Home Screen |
No comments:
Post a Comment