4
votes

I am using Robot Framework for my web application automation execution.I had found one such solution using Selenium Web-driver.

scroll until the element is in view using Selenium Webdriver

But I wanted to accomplish this using Robotframewrok-Selenium2Library.

Please suggest such keyword if any.

Thanks.

3

3 Answers

3
votes

Finally I got the solution to my query. I have to download the ExtendedSelenium2Library from : Github_Page

then I installed it and it is working fine now.

Thanks.

1
votes

ExtendedSelenium2Library solved the problem of scrolling down and selecting an element. I used the keyword 'Scroll Element Into View' for my application. However the ExtendedSelenium2Library will not work with the higher versions of the selenium2library.

Below is my 'pip freeze' command output which is working

robotframework==3.0.2
robotframework-extendedselenium2library==0.9.1
robotframework-selenium2library==1.8.0
robotframework-seleniumlibrary==2.9.2
selenium==3.8.0
urllib3==1.22
0
votes

I was stuck at similar blockade and i could resolve as below: Hope this might be of little help!

Use ExtendedSelenium2Library Library...

Example:

***Settings***
Library            ExtendedSelenium2Library

*** Keywords ****

Add Your Methods
    #Execute Javascript    window.scrollTo(0,200);
    Scroll Element Into View    ${YourElement}
    Wait Until Element is visible    ${YourElement}     timeout=5s
    Set Focus To Element    ${YourElement}    
    Click Element    ${YourElement}