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

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.

Related

Build Chrome extension to automate debugging - which auto test framework can i use?

I'm currently have a task of making an idea for building a Chrome Extension to automate Debugging web code.
This is a test to get the position in company (not what I'll do in real)
Can I use Auto test frameworks such as Selenium in my Chrome extension?
I've googled but most people care about use Selenium to test a Chrome extension, while I want to put Selenium into my Extension to test people's website.
Thank you guys!

Customized Reports for Protractor test

I am newbie from Selenium to Protractor. I am extensively using well customized reports such as Extent and ATU reports.
But in protractor i don't find anything apart from basic XML and jasmine2HTML. Is there anyone aware of any third party such as Extent/ATU in selenium for protractor?
If you are using Jasmine as your Protractor driver then you can create a custom reporter that does whatever you want.
https://jasmine.github.io/2.1/custom_reporter.html

Fitnesse: integration with Selenium WebDriver

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.

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.

Launching Selenium test from bookmark?

I have some Selenium IDE scripts for automating tasks (deploying to an internal server via it's web interface), and I want to have bookmarks to launch them.
Don't want go to Tools -> Selenium IDE -> search test -> launch test, just want to click a bookmark and let the script run.
How can I achieve this? Am I missing a point?
Don't know if it makes a difference, but I'm currently using Firefox (if I have to change browser for this, it wouldn't be a problem).
Thanks
Not sure whether you be able to run tests pressing on a bookmark as browser plugins are usually run with a key combo. And bookmark is URL. Well the main issue in your question how to associate bookmark
with browser addon launching.
Well, I've investigated a lil bit workaround. Speaking about getting Selenium HTML Test Suites Running Automatically (i mean an alternative to bookmarks) some solutions are possible:
solution 1:
Patch the Selenium server code to support HTML suites.
Build a script to execute your HTML test suites.
Build a script to read the suites’ output reports and consolidate
the information for inclusion into your CC.NET report.
Setup details you can get here
Solution 2:
Selenium IDE plugin for Firefox to create tests
Java to run Selenium Server
Selenium Server to run test suites
Nant to generate reports for CruiseControl.NET
CruiseControl.Net as a continuous integration engine
Setup details here
Hope this be useful for you.
Bookmarks are nothing else than URLs, which makes it impossible to "bookmark" a functionality of a plugin, such as the Selenium IDE.
However, there might be other plugins out there that do what you want. I haven't had a closer look at it, but one candidate could be the Favorites (Selenium IDE) Firefox Add-on.