I am working as a QA-Automation for a company. I wanted to contribute to selenium webdriver v3.0.2. I started working on it.
Forked the project from https://github.com/SeleniumHQ/selenium
Cloned the selenium source
Now I want to setup and run the sample tests in the project and I want to configure to my eclipse. I am just stuck this point. It would be very much helpful if anyone shares the solutions.
Thanks in advance.
Related
Im trying yo find a simillar way that integrating labda autoamtion run with existing selenium- testng tests by hyperexecute
Can somebody help !?!
We are creating a Selenium and Appium project in eclipse.
I was wondering if there are rules or right practices or correct location for Selenium and Appium classes?
During our training on Selenium, I notice that location of classes are in src/main/java.
While in our training on Appium the location of classes are in src/test/java.
Is it also okay to put the Selenium classes src/test/java?
Will there be any problem?
Or is it also okay to put Appium classes in src/main/java?
Will there be any problem?
What will be the best practice for locations of Selenium and Appium classes?
FYI, there will be no other code for the application. Just the Selenium and Appium classes.
TIA
Q. Is it also okay to put the Selenium classes src/test/java? Will there be any problem?
Ans: Yes it's absolutely fine, if you entire project is meant for test automation. There won't be any issue.
Q. Or is it also okay to put Appium classes in src/main/java? Will there be any problem?
Ans : Answer is again No
Since you've mentioned
there will be no other code for the application
It really does not matter if you keep your code in any one of the folders
Since It's a Maven project, main/java is for development and test/java is for unit test. Nothing more nothing less, it's all up to you to decide which one to go for.
Cause if you are using TestNg, in xml you would have to give the full file path in order to run the class file, so it does not really matter.
I am using "selenium-server-server-standalone-2.44.0.jar" jar file to run my test suite in selenium test runner. It runs well in firefox & chrome, but it gives this info text in the test run report
"info: Selenium 1.0 (Core, RC, etc) is no longer under active development. Please update to WebDriver ASAP"
How do i update to webdriver manually? or How can i get rid of this info text?
The info message you are seeing is essentially warning you that if you continue to use the Selenium RC API, your tests can stop working with more recent releases of browsers. In the upcoming Selenium 3, the RC API will be dropped outright.
There is no way to just get rid of the text, it is a warning message, and it is a valuable warning message.
In order to move on to WebDriver you will need to rewrite all your tests. A suggestion is to start with failing ones first. Start by reading through the official documentation. There is also a link from there pointing you towards more specifics. While you are at it, you might also want to consider refactoring your code to use PageObjects, which was not available in Selenium 1.
Note that while you are migrating your tests, it is quite possible to run a mix of WebDriver and RC tests in the same project.
Point is WebDriver is half finished kind of thing and people not that deeply testing websites, it was useful to have IDE and automate quickly, so this selenium 1.0 works much better and should not be disabled at any point.
I did a patch in the HtmlUnitDriver.java file, as explained here:
Is it possible to ignore JavaScript exceptions when working with WebDriver (HtmlUnit, Ruby bindings)
I've followed the explanations on the selenium build wiki and in the readme, also the tip given here:
Building the Selenium Server Project
Still, I don't have a jar file like selenium-server-standalone-2.25.0.jar which can be run and used as a headless browser for selenium tests.
... So I'm trying to recreate the selenium-server-standalone-2.xx.jar file with my patch, and use it to run my headless tests.
Can anyone explain to me how to do this? Thanks!
The best way I found is to do:
go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber
This will create a single jar for the selenium server
Then run go release.
The resulting .jar should be found in build\dist folder of the selenium source folder. (ex. ./build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar)
See also https://github.com/SeleniumHQ/selenium/wiki/Building-WebDriver#tips.
Here is a step by step building guide for selenium standalone server. The build process of selenium projects may be not so strait forward to newbies, so I recommend this detailed guide on how to create a runnable standalone jar.
http://shengwangi.blogspot.com/2014/08/how-to-build-selenium-from-source.html
Also you can refer to the official document on build selenium.
https://code.google.com/p/selenium/wiki/BuildingWebDriver#Building_Selenium_Server
I have Selenium IDE and i want to install Selenium Webdriver.
1) Can anyone tell me where can i download selenium webdriver. i don't see any link available in the documentation.
2)Can i use selenium webdriver with PHPUnit? I see some materials saying php is not supported in selenium 2 however there are some download links available for phpbindings for webdriver what is this exactly?
3)If i have Selenium webdriver do i still need selenium server to run test cases in different browsers?
I would appreciate your answers...
I completely agree with you. They have a ton of documentation, but they do a horrible job of explaining what you actually need. It took me about 2 days to put all the pieces together. You will need a few things...
If you are running tests with C#, download NUnit, C# client drivers. Create a class library project in Visual Studio and reference the dlls (assemblies) for NUnit (for appropriate dotnet version) and the C# client drivers. Compile your class library. It should create a dll inside of the bin\Debug directory. Then go into NUnit, create a project, and then open your assembly in that bin\Debug directory. That should get you started.
If you're developing using Java, download JUnit (not NUnit) and then download the Java Client Drivers, and use Eclipse instead of Visual Studio. You can launch JUnit right from Eclipse.
I've only tried NUnit and JUnit before. But I'm sure PHPUnit can also be launched from Eclipse (educated guess). There seems to be the most documentation for Java and Python.. from experience, but I've been doing everything in .NET and I haven't had anything I couldn't solve.
The Unit Testing software isn't required, but the code the format add-ins for Firefox Selenium IDE will build the code for NUnit (C#) or JUnit (Java), etc... so most use those tools.
If you want to get some boilerplate code, go into Selenium IDE and turn on experimental features under options. Then export your C# code (or Java code) from the format menu after you've recorded your commands. It won't all convert 100%, so be aware of that. Just google from there to get questions answered.
One thing to watch out for... clickAndWait commands won't convert to click and wait in the code. You will either need to do an implicit wait or a thread.sleep wait after certain commands before you'll be able to access the next element if you're waiting for an action to occur. You will also want to turn on native events so you can fire certain JavaScript events. Your fire events won't work if the driver doesn't have this turned on. The WebDriver driver.
If you have any other questions, let me know.
You can download Selenium server as well as client driver from the following:
http://code.google.com/p/selenium/downloads/list
You can download "php-webdriver-bindings-0.9.0.zip" from the following source:
http://code.google.com/p/php-webdriver-bindings/downloads/detail?name=php-webdriver-bindings-0.9.0.zip
In C# context:
Now the better way of including packages in C# project is using nuGet. nuGet is packaging utility which when executed from its powershell command window, quickly downloads the dll files and links them to project. Below link details on how to use nUGet to install packages of selenium webdriver, selenium support and nUnit.
How to invoke/run different type of web driver browser using remote webdriver in C#