Able to click on button but next page is not loading in my native android application

446 views Asked by At

I am trying to automate a native application in my android tablet.In that application I need to fill the billing address and click on continue button to go to next credit card details.

Here I am facing two issues: 1.Continue button is enabled automatically when I am filling details manually.But through automation continue button is not enabled and not returning any error.

2.through automation without filling any details ,and pressing next continue button is enabled,But nothing is happening after clicking on continue button.

Below is my code.

self.d(text='Name on Card').set_text('App Test');`
self.d.press('down');
self.d(text='City').set_text('Madison');
self.d.press('down');
self.d(className="android.widget.ListView").child_by_text("Delaware",allow_scroll_search=True,className="android.widget.TextView").set_text('Delaware')
#now continue button has to be enabled automatically..but which is not happening 
self.d.press('down');
self.d(text='Continue').click()

May be I don't know some JavaScript functionality is running in the background.How can we know the reason and proceed to furuther? Need some help.

By the way I am using selenium-webdriver,python,uiautomator python wrapper.

1

There are 1 answers

0
Suneetha Thentu On BEST ANSWER

Finally I got solution for this. By using python wrapper for UIAUTOMATOR I am able to proceed to next page.I am using down method until the option is visible and then pressing enter to accept it instead of click method. Below is the code.

while(self.d(resourceId="android:id/text1").text!='Hawaii'):
        self.d.press('down');
self.d.press('enter')