I was trying to manually run selenium server standalone on MAC and then run my tests with intern-runner in Chrome browser. As I've been advised on intern User Guide:
"To use ChromeDriver and IEDriver with a Selenium server, the driver executable must either be placed somewhere in the environment PATH, or their locations must be given explicitly to the Selenium server using the -Dwebdriver.chrome.driver (ChromeDriver) and -Dwebdriver.ie.driver (IEDriver) flags upon starting the Selenium server."
I started the Selenium server and put path to chrome driver on my machine, but got error:
"Unknown option: -Dwebdriver.chrome.driver"
any idea on why seleinum unable to recognize the options?
Is there any other solution on how to run chrome webdriver/IE webDriver from command line with selenium standalone server?
Where the driver executable could be placed in the environment PATH on MAC?
I was able to run chrome driver separately with out any issues using:
./node_modules/.bin/chromedriver --port=4444 --url-base=wd/hub
For selenium3 you need to use Dwebdriver.chrome.driver option first.
java -Dwebdrive.chrome.driver=path_to_chrome_driver -jar selenium_server_file
To avoid any path issues better download both files in the same directory and run from there.
Example:
java -Dwebdrive.chrome.driver=chromedriver -jar selenium-server-standalone-3.0.1.jar
Also have Chrome browser installed.
Is drive instead of driver
Related
Im working with Jmeter, trying to running it as a proxy, but when I start recording, I got this alert. I tried setting user.properties, but i can’t find a solution. Please, so grateful if you help me!
In order to be able to record HTTPS traffic JMeter generates special MITM certificate which needs to be installed in the browser
In order to be able to generate the certificate JMeter needs keytool command which normally lives in "bin" folder of JDK or JRE
So make sure to add the "bin" folder of your Java installation to your operating system PATH and it should resolve your issue.
Example command on Windows:
setx PATH=c:\java\bin;%PATH% && jmeter.bat
Example command on Unix and derivatives:
PATH=/opt/java/bin:$PATH && ./jmeter.sh
Replace c:\java or /opt/java with the real path to your JDK or JRE installation.
You should get something like:
if you launch JMeter from the same terminal window you will be able to start the HTTP(S) Test Script Recorder without any issues
Also be aware that there is an easier way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies and SSL certificates
I am using Selenium Standalone Server on OS X together with facebook/php-webdriver. I am trying to run a PHP script using ChromeDriver 2.28 which is up to date. If I launch selenium-server-standalone-2.53.0, my script works perfectly. If I launch selenium-server-standalone-3.3.1, my script dies with the message Driver info: driver.version: unknown. I have tried to add -Dwebdriver.chrome.driver=chromedriver in my Java command but it does not change anything. Chrome, ChromeDriver and the selenium-server-standalone-3.3.1.jar are in the Applications directory and I launch my Java command line from that directory.
Sorry, I found the answer, it's an issue between facebook/php-webdriver and the new selenium-server-standalone-3.3.1.jar. With the previous version of selenimum server, the \Facebook\WebDriver\RemoteRemoteDriver::createBySessionID() was creating a new session when the session id passed as an argument was null whereas it now fails with the message Driver info: driver.version:unknown. I don't think it can be considered as a bug apart from the fact that the error it triggers does not help to determine its origin.
We are running selenium UI automation through Teamcity build Agent but it couldnt launch firefox and the error is below:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host localhost.localdomain on port 7055 after 45000 ms. Firefox console output:
Error: cannot open display: :0.0
Error: cannot open display: :0.0
Before trying with Teamcity build agent , we have executed the selenium cases manually (by running the ant script) in the build agent VM and it could launch firefox and executed the cases successfully.
so, we don't see any problem of compatibilty between firefox and selenium jar version.
It seems like your configuration misses a virtual display.
You need a virtual display if you want to run selenium with a browser such as Firefox, IE, ..., without any display. You could use Xvfb for that, or headless browser such as phantomJS.
There are a lot of articles about that, like this one
Or you could export your display to a monitoring environment, if you want selenium tests to be displayed while they run.
I'm trying use to selenium with firefox on CentOS from command line like this:
java -jar selenium-server-standalone-2.19.0.jar -interactive
Then, I type:
cmd=getNewBrowserSession&1=*firefox&2=http://www.google.com
Then it stucks on "Preparing Firefox profile..." part and crashes:
13:59:13.105 INFO - Preparing Firefox profile... 13:59:33.366 ERROR -
Failed to start new browser session, shutdown browser and clear all
session data
Please help me solve this, I'm quite new to the unix world.
Thanks!
Are you pointing directly to the firefox executable, or are you pointing to an alias?
By default selenium should be pointing to your selenium binary, what is in /usr/bin is usually a script that interacts with the firefox executable.
you could define a specific firefox profile (you have to create it first):
java -jar selenium-server.jar -log SeleniumServer.log -firefoxProfileTemplate "PROFILEPATH" -interactive
And for those wondering, if you're at the command line, you can create a profile like this:
firefox -CreateProfile profilename
I am using selenium grid for automated testing. I have followed the official documents to install the grid. But after running the run-demo-in-parallel, the test casses fail with the following error in the target folder.
Parameter #1 Parameter #2 Parameter #3 Parameter #4
localhost 4444 *firefox http://images.google.com
**Could not contact Selenium Server; have you started it on 'localhost:4444'** ?
Read more at http://seleniumhq.org/projects/remote-control/not-started.html Connection refused: connect
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:86)
at com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.startSeleniumSession(ThreadSafeSeleniumSessionStorage.java:26)at com.thoughtworks.selenium.grid.demo.WebTestForASingleBrowser.domme(WebTestForASingleBrowser.java:51)
Can you please tell me what the issue can be ?
I am using a windows7 machine.
With java jdk and jre 1.6. Selenium version 1.0.8 . Selenium stand alone server -2.5.0.
Is there any more information i can give ?
open up taskmanager and see if there is a process with the name java.exe or javaw.exe running if that is not the case then your Sel Grid has not yet been started. Please open (double click) the selenium-server-standalone-2.5.0.jar file then again statup taskmanager and make sure your grid is up and running and then try.
if the process is nt started It might be the case that your grid is not able to start to some reason I would suggest opening up a command prompt window and run the following command:
java -jar selenium-server-standalone-2.5.0.jar -role hub
Note: You need to be in the directory where the jar file is for the above command to work else cmd will throw an error saying file not found
Please let me know if you need more help.