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.
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
Clicking on Hide on the Django debug toolbar (version 1.10.1) does not work on my Google Chrome (Version 69.0.3497.100). I'm using Django 1.11.15 and I can confirm that the Hide does indeed work on Firefox.
The following is output by the console:
Uncaught ReferenceError: djdt is not defined at toolbar.js:305
Line 305 being:
})(djdt.jQuery, djdt);
Anyone have suggestions on how to fix this or provide a possible workaround?
The toolbar.js file does not contain })(djdt.jQuery, djdt); in version 1.10.1. It sounds like your browser may have cached an old version of toolbar.js.
You may have to run collectstatic To update your static files with the new version.
So, I'm working on a robotframework test project, and the goal is to run several test suites in parallel. For this purpose, pabot was chosen as the solution. I am trying to implement it, but with little success.
My issue is: after installing Pabot (which, I might say, I did by cloning the project and running "setup.py install", instead of using pip, since the corporate proxy I'm behind has proven an obstacle I can't overcome), I created a new directory in the project tree, moved some suites there, and ran:
pabot --processes 2 --outputdir pabot_results Login*.robot
Doing so results in the following error message:
2018-10-10 10:27:30.449000 [PID:9676] [0] EXECUTING Suites.LoginAdmin
2018-10-10 10:27:30.449000 PID:400 EXECUTING Suites.LoginUser
2018-10-10 10:27:30.777000 PID:400 FAILED Suites.LoginUser
2018-10-10 10:27:30.777000 [PID:9676] [0] FAILED Suites.LoginAdmin
WARN: No output files in "pabot_results\pabot_results"
Output:
[ ERROR ] Reading XML source '' failed: invalid mode ('rb') or filename
Try --help for usage information.
Elapsed time: 0 minutes 0.578 seconds
Upon inspecting the stderr file that was generated, I have this message:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\robotframework-3.1a2.dev1-py2.7.egg\robot\running\runner.py", line 22, in
from .context import EXECUTION_CONTEXTS
ValueError: Attempted relative import in non-package
Apparently, this has to do with something from the runner.py script, which, if I'm not mistaken, came with the installation of robotframework. Since manually modifying that script does not seem to me the optimal solution, my question is, what am I missing here? Did I forget to do anything while setting this up? Or is this an issue of compatibility between versions?
This project is using Maven as the tool to manage dependencies. The version I am running is 3.5.4. I am using a Windows 10, 64bit system; I have Python 2.7.14, and Robot Framework 3.1a2.dev1. The Pabot version is 0.44. Obviously, I added C:\Python27 and C:\Python27\Scripts to the PATH environment variable.
Edit: I am also using robotframework-maven-plugin version 1.4.0.8, if that happens to be relevant.
Edit 2: added the error messages in text format.
I believe I've come across an issue similar when setting up parallel execution on my machine. Firstly I would confirm that pabot is installed using pip show robotframework-pabot.
Then you should define the directory your results are going to using -d.
I then modified the name of the -o to Output.xml to make it easy to identify.
This is a copy of the code I use. Runs optimally with 8 processes
pabot --processes 8 -d results -o Output.xml Tests
Seems that you stumbled on a bug in the prerelease version of robot framework (3.1a2.dev1).
Please install a release version of robot framework. For example 3.0.4.
Just in case anyone happens to stumble upon this issue in the future:
Since I can't use pip, and I tried a good deal of workarounds that eventually made things more unstable, I ended up saving my project and removing everything Python-related from my system, so as to allow me to install everything from scratch. In a Windows 10, 64bit system, I used:
Python 2.7.14
wxPython 2.8.12.1, win64, unicode, for py27
setuptools 40.2.0 (to allow me to use the easy_install command)
Robot Framework 3.0.4
robotremoteserver 1.1
Selenium2Library 3.0.0
and Pabot version 0.45.
I might add that, when installing the Selenium2Library the way I described above, it eventually tries to download some things from the pip repositories - which, if you have a proxy, will cause you trouble. I solved this problem by browsing https://pypi.org/simple/selenium/, manually downloading the 2.53.6 .tar.gz file, then extracting it and running setup.py install on the command line.
PS: Ideally, though, anyone should be able to use proxy settings from the command line (--proxy http://user:password#server:port) to get pip and then use it; however, for some reason, probably related to network security configurations that I didn't want to lose time with, this didn't work in my case.
Clicking on Hide on the Django debug toolbar (version 1.10.1) does not work on my Google Chrome (Version 69.0.3497.100). I'm using Django 1.11.15 and I can confirm that the Hide does indeed work on Firefox.
The following is output by the console:
Uncaught ReferenceError: djdt is not defined at toolbar.js:305
Line 305 being:
})(djdt.jQuery, djdt);
Anyone have suggestions on how to fix this or provide a possible workaround?
The toolbar.js file does not contain })(djdt.jQuery, djdt); in version 1.10.1. It sounds like your browser may have cached an old version of toolbar.js.
You may have to run collectstatic To update your static files with the new version.
I'm totally new to selenium and when I wrote this piece of code, I'm getting an error from chrome saying "chrome driver has stopped working" and it asks me to close chrome or not.
from selenium import webdriver
chrome_path="C:\Python27\Scripts\chromedriver.exe"
driver=webdriver.Chrome(chrome_path)
driver.get("https://www.google.com")
After I execute this line in my IDLE
driver=webdriver.Chrome(chrome_path)
Chrome opens but says "You are using unsupported command line flag: -- ignore-certificate-errors. Stability and security will suffer." and it pops up a dialog box telling me to "Disable developer mode extensions"
After I type this line
driver.get("https://www.google.com")
A dialog box appears saying chromedriver.exe has stopped working and it gives me a button to close program. Sometimes this doesn't appear straight away, I get some error on IDLE GUI like this. Click me for the error image
Few details :-
Chrome Version :- 60.0.3112.101
chromedriver version :- 2.9.248315
Python version :- 2.7.13
Please upgrade to the newest chromedriver version.
Link to chromedriver