How to run selenium IDE on chrome - google-chrome

I want to run selenium IDE on chrome. for that i have to write following cmd command. As it is shown here
E:\Automation\Selenium>java -jar selenium-server-standalone-3.5.3.jar chromedriver.exe
But it gives me the error like below :
Exception in thread “main” com.beust.jcommander.ParameterException: Was passed main parameter ‘chromedriver.exe’ but no main parameter was defined
at com.beust.jcommander.JCommander.getMainParameter(JCommander.java:914)
at com.beust.jcommander.JCommander.parseValues(JCommander.java:759)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.(JCommander.java:210)
at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:227)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)
Please let me know if am doing anything wrong in the above command.

You need to run it like this
java -jar -Dwebdriver.chrome.driver=chromedriver.exe selenium-server-standalone-3.5.3.jar

Related

apache drill: "no current connection" error and "could not find or load main class sqlline.sqlline" error

I am using JDK: 1.8.0.281 and Drill: 1.18.0 on m1 Mac.
I cannot start drill downloaded from https://drill.apache.org/download/ directly. It says
could not find or load main class sqlline.sqlline. So I refer to https://github.com/julianhyde/sqlline/issues/69, download and compile sqlline and add these two lines
BINPATH=/Users/fields/Repositories/sqlline-sqlline-1.9.0/bin
exec java -cp $BINPATH/../target/sqlline-1.9.0-jar-with-dependencies.jar sqlline.SqlLine "$#"
to the beginning of drill/bin/sqlline. Then I start drill-embedded and get no current connection every time I enter a query.
Please help me identify the problem. Thanks a lot!!!

impossible to run a test through the selenium RC on chrome

I run a test through selenium RC and it works fine. I use this command line:
java -jar selenium-server-standalone-2.32.0.jar -firefoxProfileTemplate "SeleniumProfile" -htmlsuite "*firefox" "https://www.google.com" "testSuite1.html" "result.html"
I try to run the same command on chrome by replacing "*firefox" by "*googlechrome" and it fails:
Chrome is open but displaying the following message : "You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer"
I got the same result by removing -firefoxProfileTemplate "SeleniumProfile" in the command line.
Do you have any idea of what I have to modify to make it works?
Thanks by advance,
Thomas.
I think you have to point to Chrome driver, so add this:
-Dwebdriver.chrome.driver=C:\grid2\chromedriver.exe
Download the driver here: https://code.google.com/p/chromedriver/downloads/list
and modify the path wherever you want.
Of course, you have to remove the Firefox profile reference.
Hope it helps.
You can add the following two lines which should fix this error:-
System.setProperty("webdriver.chrome.driver", "C:\Users\Administrator\Documents\selenium\chromedriver_win32\chromedriver.exe");
WebDriver driver = new ChromeDriver();

rg.codehaus.groovy.control.MultipleCompilationErrorsException when I have 2 different jdbc jars on classpath [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Manifest.MF issue with MSSQLSERVER 2008 and Groovy
I have a very simple groovy script with 2 database connections:
One db connection to Oracle
Another db connection to SQLServer
Problem
When I run the program through the GGTS Editor (The groovy and grails version of SpringSource Tool Suite), the two queries run and return results fine. But, when I run the program from the command line, from the project folder as follows:
groovy -cp lib\jtds-1.3.0.jar lib\ojdbc6-11g.jar src\Starter.groovy
I get the following error:
C:\workspace-ggts\Test>groovy -cp lib\jtds-1.3.0.jar lib\ojdbc6-11g.jar src\Star
ter.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\workspace-ggts\Test\lib\ojdbc6-11g.jar: 1: unexpected char: 0x3 # line 1, col
umn 3.
PK♥ ßî∟9 ♦ META-INF/■╩ ♥ ☻ PK♥♦ ßî∟9 ¶ M
ETA-INF/MANIFEST.MF?æ┴N├0►D∩æ≥☼½₧α►7)R[rúΘÑá☻R½^æq6─òcç╡SΦ▀π4◄ → ─╒3;π}╗µ
Z▬h]┤C▓╥Φ¶↕▬ç┴¬¬§V¿↔w■╤ï:7ö┬♥qí►2C╡íôtf▌Jº0♣│╧ƒ┼öφ9
^
1 error
What I have Tried
I have tried using the jtds driver to connect to SQLServer as I thought the problem was the sqljdbc4.jar from Microsoft site based on this same problem reported differently here
I have tried putting semicolons to separate the classpath dependencies, and still same error.
I have upgraded java version to 1.7. Groovy version is 2.0.5
From the IDE it runs fine, but from command line I get the error.
If I comment out one of the db access code (connection, query, println of resultset) leaving my groovy script with only one db connection & access the program runs fine from command line. For example:
This
groovy -cp lib\jtds-1.3.0.jar src\Starter.groovy
or this:
groovy -cp lib\ojdbc6-11g.jar src\Starter.groovy
does work. As soon as I add the code and the jar in the classpath for that second db access I get the error reported above.
I am out of thoughts or ideas
Files in your classpath need to be separated with a semi-colon on Windows. On unix-like platforms like Linux or OSX, the separator is a colon. Groovy is treating the second jar file as the script, and the script name as the first command line parameter.
Try this:
groovy -cp lib\jtds-1.3.0.jar;lib\ojdbc6-11g.jar src\Starter.groovy
Do you get a different error with that?

Error while running JUnit test from command line

I am trying to run a single JUnit test from the command line but I am getting an error.
I could compile the JUnit test successfully and the class file gets created in the correct location.
But when I try to run it using:
C:\Program Files\Java\jdk1.7.0_01\bin>java org.junit.runner.JUnitCore C:\eclipse\eclipse-java-helios-SR1-win32\eclipse\JunitWS\SeleniumTraining\src\com\org\tests\Nav.class
I get the error:
JUnit version 4.8.1
Could not find class: C:\eclipse\eclipse-java-helios-SR1-win32\eclipse\JunitWS\SeleniumTraining\src\com\org\tests\Nav.class
Exception in thread "main" java.lang.NoClassDefFoundError: org/hamcrest/SelfDesc
ribbing
I don’t know why it is not able to find the class even though it exists in the said location.
You need to specify the name of the class on the command line, not the filename:
java org.junit.runner.JUnitCore com.org.tests.Nav
From the javadoc for JUnitCore:
JUnitCore is a facade for running tests. It supports running JUnit 4
tests, JUnit 3.8.x tests, and mixtures. To run tests from the command
line, run java org.junit.runner.JUnitCore TestClass1 TestClass2 ....
For one-shot test runs, use the static method runClasses(Class[]). If
you want to add special listeners, create an instance of
org.junit.runner.JUnitCore first and use it to run the tests.
and you will have to add the bin directory (note NOT the src) to the classpath of the command line as well. This may look like:
java -cp C:\eclipse\eclipse-java-helios-SR1-win32\eclipse\JunitWS\SeleniumTraining\bin org.junit.runner.JUnitCore com.org.tests.Nav

Selenium RC -htmlsuite error

after running the command java -jar selenium-server.jar -htmlSuite "iexplore" "http://www.google.com/" "C:\Selenium\suite.html" "C:\Selenium\results.html" browser opens and shows page cannot be displayed on the test suite column.Help me out in this?
Normally when that happens it is because the path to the Selenium Test Suite is wrong. have you made sure that it is loading the correct version?
I also noticed that you are loading the browser without the * in the browser name. E.g use
java -jar selenium-server.jar -htmlsuite *iexplore http://www.google.com c:\selenium\suite.html C:\selenium\results.html
I have a tutorial on how to get this going on my site at http://www.theautomatedtester.co.uk/seleniumtraining/selenium_rc_setup.htm
Try below command and let us know your feedback, it should work.
java -jar selenium-server.jar -htmlSuite "iexplore" "http://www.google.com/" "C:\Selenium\suite.html" "C:\Selenium\results.html" -port 4444