What version of selenium are you using?
I am currently using selenium==2.39.0
and do not have the issue. A colleague of mine reported the same issue as you when running selenium==2.41.0
and downgrading to the same version as me fixed the issue.
maximize page size in selenium webdriver /firefox driver in django/python?
-
21-07-2023 - |
Pregunta
Here is my TestCase:
class AdminTest(LiveServerTestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.set_window_size(1920, 1080)
def tearDown(self):
pass
#self.browser.quit()
def test_admin_site(self):
# user opens web browser, navigates to admin page
self.browser.get(self.live_server_url + '/admin/')
body = self.browser.find_element_by_tag_name('body')
self.assertIn('Django administration', body.text)
I find that the body of the content in HTML is very small. I tried maximizing the firefox by setting window_size, but that only increased the overall size. Here is the screenshot from selenium
Here is the screenshot from running: python manage.py test my_app/
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow