SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.18k stars 8.11k forks source link

got MemoryException in some cases #9719

Closed GorgMish closed 3 years ago

GorgMish commented 3 years ago

🐛 Bug Report

Running get() command for some domains e.g. bet365.com, 365097365.com would end up out of memory exception. More precisely, it will exceed the timeout and then kinda freeze till it throws a memory exception error.

To Reproduce

Just try to run get() command for those cases and then run some other webdriver commands which need memory to perform, like find commands.

Expected behavior

I expect to have all <p> tags in p_tags values without any exception.

Test script or set of commands reproducing this issue

from selenium import webdriver
driver = webdriver.Firefox()
driver.get("https://www.bet365.com")
p_tags = driver.find_elements_by_tag_name("p")

Environment

OS: ubuntu 20.04 Browser: Firefox Browser version: 89.0 Browser Driver version: GeckoDriver 0.29.0 Language Bindings version: Python 3.9

diemol commented 3 years ago

Sites like https://www.bet365.com block WebDriver, normally because their terms of use does not allow the use of automation tools in their website (link spidering or similar). There is nothing we can do on the Selenium side, besides recommending everyone to respect the terms of use of those websites.