I am trying to test a webpage with Selenium. My code is below.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.send_keys("selenium")
elem.send_keys(Keys.RETURN)
driver.close()
When I run the above code, a Firefox browser window pops up as expected. However, the size of the window's fields are very small (see picture below). So small that the left most tab runs into the window's zoom button. This sizing issue does not occur when I use the Chrome WebDriver. Has anyone had this sizing issue? Any has anyone found out how to solve this issue?
Here is my mini-stack:
This is the issue with the latest selenium
package version:
As a workaround, downgrade selenium
to 2.40.0
version:
pip install selenium==2.40.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With