selenium-chromedriverazure-service-fabric

Service Fabric Local Cluster with Selenium Web Driver in Interactive Mode


I run Microsoft Service Fabric with 1 Node in Local Cluster Mode. Is it somehow possible to start the selenium chromedriver in interactive mode from the Service?

When i start selenium chromedriver session it seems to start non-interactive or invisible in headless mode. (not sure about that)


Solution

  • I solved it starting chrome in debug mode and attach the chrome driver from the service to it.

    Steps:

    1. Start Chrome Browser manually in Debug Mode:

    "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=c:/tmp/selenium
    

    2. Start Chromedriver with DebuggerAddress from ChromeOptions

    // chrome options            
    ChromeOptions chromeOptions = new ChromeOptions();  
    
    // set debugging address to chrome           
    chromeOptions.DebuggerAddress ="127.0.0.1:9222" 
    
    // start driver with options
    IWebDriver driver = new ChromeDriver(chromeOptions)
    

    you can then watch all chromedriver interactions in the chrome window from step 1.