0
votes

getting error : WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed

getting above error while running a robot script: It is a simple code to open you tube in chrome browser. it looks like this:

*** Settings ***
Library  SeleniumLibrary

*** Variables ***
${Browser}  Chrome
${URL}  https://www.youtube.com/

*** Test Cases ***
TC1
    Open Browser  ${URL}  ${Browser}
    Input Text  name:search_query  ted talk
    Click Button  id:search-icon-legacy

It is on ubuntu using python2.7

  • robotframework==3.0.2
  • robotframework-mqttlibrary==0.7.0
  • robotframework-selenium2library==1.8.0
  • robotframework-seleniumlibrary==4.3.0
  • ChromeDriver 80.0.3987.106

I tried updating chrome and chrome driver also. I don't know what am i doing wrong, please help.

1
ps: Google Chrome 80.0.3987.106prachi sutane
Remove selenium2library as it is older than seleniumlibrary v.4.3.asprtrmp
removed selenium2library, still nothing..prachi sutane

1 Answers

0
votes

You are trying with robotframework-seleniumlibrary==4.3.0 & robotframework==3.0.2

Update the robotframework-seleniumlibrary 4.3.0 to 3.0.1

pip install robotframework-seleniumlibrary==3.0.1

Add capabilities

${chrome_options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver

Call Method    ${chrome_options}    add_experimental_option    w3c    ${False}    
Call Method    ${chrome_options}    add_argument    no-sandbox
Call Method    ${chrome_options}    add_argument    disable-setuid-sandbox
Call Method    ${chrome_options}    add_argument    disable-dev-shm-usage
Call Method    ${chrome_options}    add_argument    disable-single-click-autofill



Wait Until Keyword Succeeds    2x    1s
...    Create WebDriver    Chrome    alias=${Browser}    chrome_options=${chrome_options}

Go To    ${URL}
Input Text  name:search_query  ted talk
Click Button  id:search-icon-legacy