How do I navigate and click buttons on an already open Chrome instance/window. So the scenario is, that an application named "ApplicationNAME" is installed on my Windows machine, but its not a Windows application, because when I run the application it is only opening a chrome instance (not the default Chrome browser). I am also able to see the Developers Tool of chrome, and I am able to inspect the elements which means a chrome instance is opened.
So the idea is to automate this Application using Python and Selenium. I am open for alternate suggestions too. Thank you!
I have used the below Python (3.7.3) code but it doesn't help, because it rather opens another Chrome browser or navigate to already open Chrome window rather than going into the desired "ApplicationNAME" chrome instance.
from pywinauto.application import Application, WindowSpecification import time import requests import selenium from selenium import webdriver app = Application().start(cmd_line=u'"C:\\Program Files (x86)\\ApplicationName.exe" ') chromewidgetwin = app[u'ApplicationName'] chromewidgetwin.wait('ready') chromerenderwidgethosthwnd = chromewidgetwin[u'Chrome Legacy Window'] chromerenderwidgethosthwnd.click() Driver = webdriver.Chrome ("C:\\chromedriver.exe") Driver.switch_to_window('ApplicationName')