Fitnesse: integration with Selenium WebDriver - selenium

I am working on a Selenium WebDriver project, written using the page object pattern.
I wanted to know whether is there any way in which I can integrate FitNesse and Selenium WebDriver project?
I know FitNesse can be used with Selenium IDE, however, I have no idea whether is it possible to use Fitnesse with WebDriver.

You sure can, it's just Java after all. One example of such a project is (my own set of FitNesse fixtures): https://github.com/fhoeben/hsac-fitnesse-fixtures.
You could use my fixture (BrowserTest) to execute the test. Or only use the web driver setup fixture (selenium driver setup), which also also the setup to be overridden in a CI environment, and do your own thing with web driver in a custom fixture.

Related

How to access Selenium driver when coding with CodeceptJs

In order to debug an issue, I'd like to try some of the raw Selenium methods such as Actions or Javascript executor to access my elements, but as I'm behind the CodeceptJs framework, I'm not sure how I'd access the driver that these methods require, please? I'm writing my tests using BDD, Cucumber and Javascript.
Thank you.

tools to automate the script webdriver in jmeter

is there any tools which can make the automation script for webdriver in Jmeter?
You cannot just copy and paste the existing code as JMeter's WebDriver Sampler plugin:
Doesn't allow you to use DesiredCapabilities
You need to rename your WebDriver instances to WDS.browser
I don't think JUnit annotations will be processed properly.
The easiest way to run existing Selenium tests written in Java using JUnit framework is JUnit Request sampler. All you need is to package your tests as .jar file and drop them under "lib/junit" folder of your JMeter installation.
After JMeter restart you will be able to see your test class and method(s) names(s) in the JUnit Request sampler and hence it will be possible to run your test with increased number of threads.
More information: How to Use JUnit With JMeter
If u want to perform load testing, then I would prefer Jmeter. and to automate application in web browser, selenium web driver is perfect way. but as u want to automate script webdriver using Jmeter u need to integrate it using plugins of Jmeter.
U can directly pass URL in Jmeter and directly redirect to URL as well.

Is it possible to use Selenium IDE html test and capture screenshots on failure

I have created a few HTML test suites with Selenium IDE. They are automatically tested and by Jenkins daily. Now, I'm wondering if it is possible to create a screenshot whenever a test fails.
Is it possbile to catch the exeption when the IDE test fails and capture the screen? Or is it only possible with TestNG? If it's only possible with TestNG, how does selenium HTML tests work combined with TestNG?
Kind regards,
Selenium IDE doesn't directly support saving screen shots like this. Check out this other (duplicate) question: Screenshots using Selenium IDE Firefox plugin
selenium ide does not have built in screenshot capabilities, but you can inject raw javascript: "javascript{alert();}" will display an alert. If you can find a way to do it in javascript, you could add the js to selenium ide.

Selenium IDE or Builder, can they connect with Selenium Server 2?

Is there any possible way to execute the output of either Selenium IDE browser plugin or Selenium Builder plugin with the selenium-server-standalone.jar?
When I try to execute the Selenium IDE selenese output with the -htmlSuite flag of the selenium-server JAR, the server complains that sendKeys is not a valid command. sendKeys is a selenium V1 command, but the Selenium IDE outputs V2. You'd think the server could execute V2 syntax, but it can't.
When I save V1 syntax from Selenium Builder, and try to execute that with the -htmlSuite flag I get an error that "click" does not implement the event interface. (I'm guessing some other v1/v2 incompatibility)
There doesn't seem to be a way to execute the JSON output of Builder against the server either (there's a Jenkins plugin that claims to do this, but it doesn't seem to have enough logging or debug information to tell if it did anything at all).
Is there anyway to run the output of any GUI tool against Selenium Server 2?
UPDATE:
According to this bug, the selenese runner part of selenium server is abandoned. https://code.google.com/p/selenium/issues/detail?id=4349 But why would someone bother compiling, packaging and shipping abandoned code that doesn't work? I find it really hard to believe that something as popular as Selenium doesn't work with its own IDE browser plugin.
Yes, you can. First, do your research in the Selenium documentation and start a Selenium Grid on your computer. Then, you can use Maven to run Selenium Builder scripts (using a method like what I have done here: http://djangofan.github.io/maven-selenium-builder/ )
Of course, for the Builder scripts to connect to the Grid hub you need to change the calls to:
new FirefoxDriver();
to this instead:
new RemoteWebDriver( "http://hubIP:4444/wd/hub", capabilities );
, or something similar.
Thats it.
The correct answer is, "no, Selenium Server v2 does not support Selenium IDE output nor Selenium Builder output".
If you want to use the output of Selenium IDE browser plugin you need the incredible Selenese Runner project.
https://github.com/vmi/selenese-runner-java
Why this requires a 3rd party tool and isn't part of the Selenium family of products is beyond me.

Trying to use Selenium RC

I'm pretty newbie to selenium.
Im trying to configure selenium for a project in my university like the one configured with phppgadmin.
There is no .jar file, I dont need to run anything, dont even need to install libraries, etc... I dont know if this is a RC Server or Webdriver.
Also, I want to use the PHPUnit format, cause this way I can just export test cases from the Firefox Selenium IDE plugin. There is a way to do that?
There is a lot of information, webdrivers, etc in Internet but I believe the way phppgadmin do this is the best way.
If you're just looking for something quick and dirty Selenium 1 imported off of the IDE is probably for you. If in the future you plan on continuing your university project I would highly recommend learning about Selenium Webdriver (Selenium 2).
Just as a small aside: You can export your tests from the selenium IDE in any language you desire, PHP is just one of the many choices that include (Java (JUnit), Java (TestNG), Ruby, and Python). If you're interested in PHPUnit look here http://www.phpunit.de/manual/3.1/en/selenium.html, this will give you the back drop on how to start coding your Selenium Tests.
If you're going to be using the selenium RC you want to go to http://seleniumhq.org/download/. Download Selenium server. You start the server with a java -jar command. So java -jar /path/to/sel/selenium-server-standalone-2.24.1.jar. This will start the RC server and when you're interested in running some tests execute the tests and then selenium server will take care of the rest