E
E
EkS20192020-03-07 15:38:08
Python
EkS2019, 2020-03-07 15:38:08

On Python and Selenium in IE 11 how to fix error when trying to get header?

I write autotests for selenium and python. Need to do autotests in IE11. Can you tell me why the error appears File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class (message, screen, stacktrace) selenium.common.exceptions.NoSuchWindowException: Message: Unable to get browser.

The latest web driver is taken for 64-bit version of Windows 7.

Here is the code:

from selenium import webdriver

browser_3 = webdriver.Ie(executable_path = r'C:\iedriver\IEDriverServer.exe')
url = " yandex.ru "
browser_3.get (url)
print(browser_3.title)
browser_3.close()
browser_3.quit()
Full error text: Traceback (most recent call last): File "C:\Users\1\Desktop\work_and_study\programming\python\programmki\selenium\selenium for work\15.py", line 11, in print(browser_3. title) File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 342, in title resp = self.execute (Command.GET_TITLE) File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self. error_handler.check_response(response) File "C:\Users\1\AppData\Local\Programs\Python\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchWindowException: Message:Unable to get browser

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-03-07
@EkS2019

Check if the registry has

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE
iexplore.exe(DWORD) parameter with value 0. If not, then create

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question