I want to enter text inside the text box after scrolling down, but I am receiving the exception:
Element not visible
The text box is partially visible on the screen by default, if we manually scroll down than its completely visible, But selenium robot framework unable to scroll down.
I have tried:
How can I fix this?
Your scrolling code looks ok. However, I don't think scrolling is your problem. Element visibility is ok even if it is scrolled away from screen. Try this code for example. At least on Chrome page scrolls back up at Input Text keyword
I think you may have an incorrect locator for your edit box.
I fixed the issue with
There's an efficient way to scroll the page to get the element to a view port.
If we are using
Instead we can use the following line of code,
The above code will scroll the window and get the element specified in /xpathlocation to the view port.
You can use this as a keyword:
x is the number in milliseconds to scroll down.
Have you tried in Selenium webdriver in the IPython console directly?
I have tried as in the following, and it is able to scroll down.
from selenium import webdriver firefox = webdriver.Firefox() firefox.get('http://twitter.com') firefox.execute_script('window.scrollTo(0,200)')
You can just change the '200' and increase it as you want to scroll down more.
©2020 All rights reserved.