My apologies to bother all respectable professional here,
I have been struggled in this issue few weeks and can't find any similar solution on others posts,
I have done the correct settings in IE,
such as zoom level/securityTab/disableEnhanceProtectMode..etc via WebDriver Official Manual, but however, this problem persist.
Environment
I'm inside a company intranet, here is my environment:
Platform: Windows 10 Pro (must) (without admin)
browser: IE 11 (must)
Python: 3.7.4
Python Selenium: 3.141.0 (tried 4.0.0a5, see Tried)
IEDriverServer: 3.150.1 32-bit
(tried 32-bit 3.141.0/3.141.59, see Tried. 64-bit some versions been tried too,but same issue occur and with public known send keys slow issues, so not considered.)
Issues:
I want to deploy my python code(open IE and go to web system do something) to 4 computers,
so I make their environment the same (like Windows Settings/Internet Options).
The issues I faced is when I use below code to launch browser :
In [1]: iedriver = "C:\Python\IEDriverServer.exe"
In [2]: browser = webdriver.Ie(executable_path=iedriver)
In [3]: browser.get("https://Atragedy.WebSystem.com")
In [4]: browser.find_element_by_xpath(textbox).send_keys(str)
In [5]: browser.execute_script('arguments[0].click();', browser.find_element_by_xpath(SubmitBtn))
● Computer1: Everything just works fine.
● Computer2: Python will always stuck in [2] when lauching IE up(can see WebDriver initial page), not reporting any error / not going to [3] / no crashing / no stop responding , but stuck in [2] all day long if I didnt interupt it manually.
● Computer3: Python report error when [2] and not bring up IE(IE11 not appear), the error as below:
MaxRetryError: HTTPConnectionPool Max retries exceeded with url: /session (Caused by NewConnectionError(': Failed to establish a new connection [WinError 10061] No connection could be made because the target machine actively refused it
● Computer4: This computer works normally in [1] to [4], but when [5] excuting javascripts, it stucked just like Computer2's issue, the code will not go to next action and not reporting any errors all day long if I didn't interupt it manually.
Tried
◎ I tried differenet version combination of Selenium and WebDriver such as (Computer As C):
Set1. Selenium 3.141.0 / WebDriver 3.150.1 ---------------(C1 OK, C2&3 are reports C3's error, C4 issue keep).
Set2. Selenium 3.141.0 / WebDriver 3.141.0/3.141.59 --(C1234 are occur C2's error).
Set3. Selenium 4.0.0a5 / WebDriver 3.150.1 ---------------(C1234 are reports C3's error).
Set4. Selenium 4.0.0a5 / WebDriver 3.141.0/3.141.59 --(C1234 are reports C3's error).
※A strange status happen on C1, after tried Set2 on C1, C1 start have issues, even change back to Set1, still occur C2's error on C1, can't repair it.
In final I tried run with Selenium 3.141.0 and IEDriver 3.13.0 on C1 once, C1 back to normal,
futher stranged, now C1 back normal with Set1 too...
(Other computer remain their issues even with Driver 3.13)
◎ I tried clean up the original python environment and install Client level Anaconda(Ver.202002) Environment, but issue still the same, no matter use CMD/original python IDE/Anaconda Spyder 4.
◎ I tried add some code below, but all result are remain the same:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
cap = DesiredCapabilities().INTERNETEXPLORER
cap['platform'] = "Windows"
cap['version'] = "11"
cap['browserName'] = "internet explorer"
cap['ignoreProtectedModeSettings'] = True
cap["ignoreZoomSetting"] = True
cap['nativeEvents'] = False
cap['requireWindowFocus'] = True
cap['INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS'] = True
browser = webdriver.Ie(desired_capabilities=cap, executable_path=r'C:\Python\IEDriverServer.exe')
◎ I tried maunual launch IEDriverServer with 127.0.0.1:5555, and use remote to connect, C3 can lauch IE window now, but goes to C2's issue... (Others Computer remain their own issues.)
browser = webdriver.Remote(desired_capabilities=cap, command_executor='http://127.0.0.1:5555')
I'm currently out of idea to fix this issue, if any senior can provide me solution, or even some hints, I will be veryveryvery appreciated, thank you.