Selenium builder, Run Test Locally is not enabled - selenium

I have downloaded selenium builder from http://www.sebuilder.com/ with following configuration
Firefox version 43.0.4
Selenium builder version 3.0.5
After that I have
Launch the SeleniumBuilder and click the “Manage Plugins” and download the
Sauce for Selenium Builder 3 1.0.3
In SeleniumBuilder I have imported the .json script using "Open a script or suite' option.
Now under Run option 'Run Test Locally' is not found.
Any additional configuration required to enable 'Run Test Locally’ in selenium builder?

Looks like new Mozilla update have restricted the way old selenium builder ran local test, so developer had to take it out for selenium builder 3. Have a look at this https://github.com/SeleniumBuilder/selenium-builder/issues/6

Related

Error in running test case using batch file via selenium IDE

I used Selenium IDE firefox plugin to record a test case then i used '.bat' command line to automate testing using the below command,
java -jar C:\Selenium\selenium-server-standalone-2.48.2.jar -htmlSuite "*firefox" "http://16.52.110.123:8080/AntExample/userRegistration.htm" "C:\Selenium\First_Test_Real_Suite.html" "C:\selenium\logs\Result.html"
the test was perfectly working using the .bat script when suddenly today I am facing this error message in firefox when I run the script
Firefox can't find the file at
chrome://src/content/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=http://16.52.110.123:8080/AntExample/userRegistration.htm&resultsUrl=http://localhost:4444/selenium-server/postResults&test=http://localhost:4444/selenium-server/tests/First_Test_Real_Suite.html.
I am all ears to fix this issue
You are getting this issue due to latest Firefox browser update :)
First Download and Install Previous Firefox Browser Version 42.0 (Link
: Click here)
and Try to execute same Selenium Test cases using Bat file. It will work properly. :)
Also after Installing Firefox browser, Don't forgot to set following option
Goto Tools >> Options >> Advanced Tab >> Update Tab >> select "Never
check for updates (not recommended: security risk)" option to disable
auto update.
Running Selenium Test cases using bat file will work properly once new "Selenium Standalone Server" version get released (Current version is 2.48.2 will work for Firefox 42.0)
upgrade/downgrade to FF 42.0 fixed the error. Thnx guys
This is indeed because Firefox 43 doesn't allow you to run unsigned add-ons. If you insist on using the old Selenium RC Runner and want to run the latest Firefox, you can enable add-ons again by allowing for unsigned add-ons:
In Firefox go to about:config
Look for setting xpinstall.signatures.required and toggle it to false
Now any unsigned add-on will run, including the Selenium RC Runner. Use it at your own risk ;-)

Moving from Selenium IDE to what?

I have been given the following job from my boss:
three years ago a former employee created selenium tests for our project and committed them via eclipse
now I have to update the tests due to the fact that the software has changed through time.
I created new IDE tests, instead of editing the old ones.
I have committed them through CVS in the project folder and I access them via a browser (selenium has some folder in the project)
when I run these tests via IDE, they run fine, but when I run them via the TEstRUnner that is in the old selenium installation, there are a lot of errors.
Should I install new version of Selenium in the project folder and what should it be?
Or should I just run the tests from IDE instead? (I read somewhere that TestRunner will be deprecated)
How are tests made in IDE run through Web Driver?
Have you looked at Selenium Builder? It supports migrating existing scripts, works well with Sauce Labs and there is also a Jenkins plugin](https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Builder+Plugin) available.
Tests built using Selenium IDE are built using Selenium RC (1.0), and selenium WebDriver is the foundation of Selenium 2.0. Selenium has a migration document for this transition. In moving to Web Driver, you might be required to code the tests yourself, rather than using the point and click Selenium IDE.
Additionally, there is a hybrid approach for using Selenium RC code on Selenium Web Driver: http://docs.seleniumhq.org/docs/03_webdriver.jsp#alternative-back-ends-mixing-webdriver-and-rc-technologies
In order to run the Web Driver tests, you will need to have a selenium server or local browser to execute these tests. Some examples are SauceLabs, Selenium Grid, a standalone Selenium Server, or I believe you allow Web Driver to directly control the browser on the computer executing the code.

Running a Selenium2 IDE test case on the command line

I need to use the Selenium IDE to create tests for projects we are working on, but to then take these tests and run them from the command line.
The situation is that we want our developers to be able to use the IDE to test websites using a central repository of test suites using the Selenium IDE. We also need the same tests (i.e. in the IDE HTML format) to be run by a CI server (Jenkins) on Sauce Labs.
I have found that the export from the IDE isn't great (test cases that worked on the IDE don't work from the command line). I also need to use WebDriver, e.g Selenium2.
This must be possible but I just cannot see how to do it.
Try out Selunit it combines Selenium tests in Selenese HTML format with Continuous Integration. Here is a tutorial how to execute Selenium tests directly from Selenium IDE in Hudson builds and to benefit from its reporting capabilities provided for JUnit, where Selunit transforms Selenium reports to.
Selenium provides a command-line test script runner, but it's well hidden. Check out the -htmlsuite option of selenium-server.jar.
In windows system you have to download selenium-server-standalone-2.32.0.jar and Browser(IE, chrome) driverserver after downlaod you have to open CMD and run command
java -jar selenium-server-standalone-2.0b3.jar -Dwebdriver.ie.driver=.\IEDriverServer32.exe

Error using SelBlocks extension with Selenium server

I've been recording/writing Selenium html scripts using the SelBlocks extension. Now we're going to use Selenium server to run the tests in different browsers.
I tried getting the javascript from the SelBlock xpi by extracting it and reference that javascript in my selenium server bat file. When I try to run my bat file with referencing the javascript, i got the error "Line: 777 Error: 'XML' is undefined" when I run it in Internet explorer. This happens as the test script is loaded in TestRunner.
When I try to run it in Firefox, TestRunner hangs just prior to running the script.
i'm using Selenium Server 2.1, Firefox 5 and IE8.
Selblocks is only supported for Selenium IDE. See note about "no language translation" here: Selblocks documentation. Although automated translation would be an interesting area of investigation...
I've tried the same thing (Firefox 4.0, Firefox 7.0, selenium-server-2.0.5.jar, SelBlocks 1.3 installed as a firefox plugin).
Since the -userExtensions way didn't work for me, I installed SelBlocks 1.3 in the firefox profile I use with -firefoxProfileTemplate and -htmlSuite. It looks like selenium server doesn't do anything.
After more than a minute I have:
so even the selenium elapsed timer doesn't tick, and no line gets executed.
My simple test case is here.
Looks like I can't use SelBlocks with selenium-server[version].jar for now?
ANNOUNCEMENT: SelBlocks 2.1 now includes support for Selenium Server. Get the extension file here: https://raw.githubusercontent.com/refactoror/SelBlocks/master/user-extensions.js
Initial browser support is for firefox, googlechrome, and opera.

Setting up Selenium for recording as well as running in different browsers and platforms

I'd like to setup a Selenium server so that clients can record tests locally, recorded tests can be replayed and tested on an Ubuntu server with Firefox + Chrome.
Unfortunately the Selenium site is so confusing and mentions so many different projects (Selenium 1, Selenium 2, Selenium RC, Selenium Grid) that I'm not sure where to start.
How do I go about setting up Selenium Server on an Ubuntu box?
Unfortunately the Selenium site is so
confusing and mentions so many
different projects (Selenium 1,
Selenium 2, Selenium RC, Selenium
Grid) that I'm not sure where to
start.
Selenium has multiple versions
IDE - mainly to record the test and play it back. It is mainly a Firefox Addon. This can be used for very basic testing. You can also export the recorded test to selenium RC. All these mentioned in seleniumhq.org->documentation section: http://docs.seleniumhq.org/docs/
RC - Like any other automation tool, you can write your own code to run the test rather than just recording and playing it back. This has far better capabilities than IDE including support for several languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there in various platform.
Grid - This helps in running multiple tests in parallel.
To record and run the test in Firefox (NOT CHROME) its very easy. This doesn't require a selenium server running.
record the whole test
save it in a file
Copy the file to Ubuntu machine
Open the same test using IDE in Ubuntu machine and run it again in firefox
If you want to run on chrome, then you need to go to the next level of using selenium RC. And this requires the selenium server running.
How do I go about setting up Selenium
Server on an Ubuntu box
Download selenium-server jar from here. Copy this to any directory in your ubuntu server
Open a terminal and navigate to the folder which has the selenium server jar.
Enter java -jar selenium-server-jarfilename.jar
Selenium server will start on port 4444 by default and keep listening to the tests.
The site is confusing in terms of the versioning and names. Selenium is the name of the entire project which started off as Selenium RC (remote control). Selenium RC is the old version of the API which is also sometimes called Selenium 1. Selenium 2 is the newest version and the latest release was last week being Selenium RC2 (release candidate). This uses a different API to Selenium RC. The new API is known as WebDriver. The new API still allows you to access the older Selenium RC but only for backwards compatibility.
Since you're starting now, there is no reason for you to use the Selenium RC API. You should instead use the advanced user interactions which are part of WebDriver. Setting up WebDriver is pretty easy and there is a decent guide on it here. You should note that the API used there is the older standard (2.0 beta) which uses WebElements. The new API (advanced user interactions) decouples actions from the elements they are performed on a lot more. I would recommend you use the latest versions of the API which is being actively supported rather than older deprecated versions.
Since you want to do this all locally, the second link I gave you should be enough to get you up and running. Assuming you're going to be using the Java bindings it is as simple as:
public class Selenium2Example {
public static void main(String[] args) {
// Create a new instance of the Firefox driver
// Notice that the remainder of the code relies on the interface,
// not the implementation.
WebDriver driver = new FirefoxDriver();
// And now use this to visit Google
driver.get("http://www.google.com");
Actions builder = new Actions( driver );
builder.sendKeys( driver.findElement( By.name("q") ), "Cheese!" );
Action action = builder.build();
action.perform();
//Close the browser
driver.quit();
}
}
This is the example code edited to use advanced user interactions.
You must have two things to write and execute selenium tests.
1) Selenium Server is also known as Selenium RC (Remote Control). You can go to this link and download Selenium Server.
You can start selenium server with command java -jar ur_selenium_server.jar
2) Client Driver: Using client-driver you can code selenium tests. It consists of combination of selenium commands that perform certain actions on the UI. For e.g. click, select etc.
Selenium supports many different language bindings for client-driver. Download appropriate client-driver for your preferred language from above download page.
You can refer client driver apis and code your tests.
Hope this helps