0

The application is an embedded CEF3 C# MS Windows app which has enabled remote debugger address. I followed the java example and I can control the appplication using a java prg. However we use Python as the main test automation language and I tried to implement the same code in Python but I get a "cannot connect to chrome at 127.0.0.1:4444". What do I miss here:

import selenium
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
import os

os.environ["webdriver.chrome.driver"] = "D:/dev/desktop-automation/selenium/chromedriver.exe"
chromeOps = webdriver.ChromeOptions()
chromeOps.binary_location = "C:/Program Files (x86)/Path to application/Application.exe"
chromeOps.debugger_address = "127.0.0.1:4444"
browser = webdriver.Chrome(chrome_options=chromeOps)

time.sleep(3)
browser.get("http://example.com")

Thanks a lot for the help!

1 Answer 1

0

The missing bit was to set this value prior running the script: set webdriver.chrome.driver="D:/dev/desktop-automation/selenium/chromedriver.exe" It seems that the os.environ does not set this value for the running script.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.