Run Chrome browser as another user via Python and Selenium

1.3k views Asked by At

I am using Robotframework, Selenium2Library and Python to develop automated tests in an application that uses an automatic login (via AD). And (as test requirements says) I have to open the Chrome browser with different users.

I can open with "Run As" command via .bat file or a simple command:

import os
cmd='C:\Windows\System32\\runas.exe /savecred /user:USRAUT "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe http://url"'
os.system(cmd)

This works to open browser but I cannot get/handle the browser in code to perform operations. I need to open it and "return" it to my code where I can handle it.

Can someone help me or give me some suggestions?

Regards.

0

There are 0 answers