Forum Discussion

ganapati_bhat's avatar
ganapati_bhat
Occasional Contributor
10 years ago

Need information regarding scroll to see the object

Hi,



I am facing an issue while automating a page in iPad and iPhone.



I have an account page in which I have around 15 fields . Firstname, lastName and so on..

Since it is having more fields, after entering First name, I need to scroll to bottom of the page to see the continue button[iPhone]. In ipad portrait mode, entire page is displayed[no need to scroll to see the continue button]. in landscape mode of ipad, we need scroll to see the continue button.



My script is failing in the scroll command [ wPositionY=600]  in iPad, as I am able to see the button and no scroll option available.



In iPhone, without scroll I cant even check for Continue button.. Like

if(Continue.visible){

click on continue

}



if condition itself failing as it is not able to find that object.



Please suggest the solution.

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    What if you change the condition to something like this (untested pseudo-code):

    if (not Continue.Exists) {

      ScrollToBottom

      Continue = GetContinueButton(...)

    }



    if(Continue.visible){

    click on continue

    }