How Can I run Selenium Test Automation on IE 11 without an Active logged on user session

188 Views Asked by At

I have an application that runs on IE only and I am in the process of automating some stuff on it. The challenge am having is that, The application doesn't launch when I don't have an Active logged on session on the server from where am testing from (am connecting via RDP). Its very inconveniencing that you cannot run tests via IE in the "dead of the night" without a logged on user session. I have done lots of research and I don't seem to get a conclusive answer whether there is any workaround for this. To Simulate this:
My environment python 3.9 , IE11 , Windows server 2019

  1. script to launch Google

    from selenium import webdriver
    from time import sleep
    url='https://www.google.com/'
    driver = webdriver.Ie(r'C:\IEDriverServer\IEDriverServer.exe')
    driver.get(url)
    sleep(1)
    driver.quit()

  2. create a Batch file to launch the python script
    "C:\TEST\venv\Scripts\python.exe" "C:\TEST\test.py"
    EXIT

  3. schedule the batch script to run using windows scheduler

  4. Close the logged on session. in my case the scripts are running from windows server 2019.

Results

Note that, there is no issue when using chrome hence suspect its a limitation on the IE itself.

0

There are 0 best solutions below