Does selenium IDE supports pass and fail status report? - selenium

I have done automation using selenium IDE for my web application. But I couldn't get the pass/fail status report. Please show me how to get the status report in selenium IDE.

You can check this link:
https://www.quora.com/Does-selenium-IDE-support-pass-and-fail-status-reports
It has the Youtube link which answers your question.

1st thing selenium IDE can show you some summery like how many tests
passed and failed but it cannot generate enhanced reports.
for example: selenium IDE have set of test cases in its lift side panel and and they are enclosed in test suites most probably, and each test case have test steps as rows in selenium IDE body.
So while execution if a test step passes then its indicates in green color and red if fails, and if a step fails then test case in left panel indicates in red color and at bottom of the left panel you will see a number in green color which indicates passed tests and a number in red color which indicates failed ones
this is the only way it shows the summery of the execution, but you can't generate full length reports because simply selenium IDE is not meant for that purpose
most of the times people use selenium IDE for simple automation tasks where they don't expect any reporting like things, if there is a complex or more requirements of automation one has to move from selenium IDE to WebDriver

Related

test button click in different tabs of browser at same time

I would like to test a button click event of a web page in different tabs of browser.
Let's say I have button named as Save Details in URL: http://example.org/UserDetails
Now I open the same URL in two different tabs in Chrome browser window.
I would like to click Save Details button in different tabs at same time. How is this possible ? Can I do this using selenium tool ?
Being a ASP.NET developer , I am new to testing tools. Any help would be great.
Update:
I want to simulate users clicking the same button in different browser or same browser different window at same time.
Selenium is just an FT tool and it can perform single operation just like humans at a time on a webelement in non parallel run. So, at the same time it cannot perform click operation on two different tabs in same browser window.
For your use case, you need to depend on any other framework like TestNG along with selenium. TestNG has parallel run feature which allows you to trigger multiple test case at the same time. So, in your scenario, the same test case needs to be defined twice or can be duplicated and include both the test case in Testng.xml from where execution triggers. And also ensure that you include below attributes in testng.xml
<suite name="TestSuite" thread-count="2" parallel="methods" >
Thread-count - number of instances which you wish to open
Parllel - Indicates that the run should be parllel
In this run, there will be 2 browsers invoked at same time and two test cases(duplicated) will be executed in each browser. It cannot execute in two different tabs, it will be in two different windows
And also please note that it may not be accurate and there may be a difference of fraction of seconds due to network latency and machine performance

How to record test cases with robotframework?

I recently started using robotframework with the Selenium2Library. I haven't tested using Selenium before, but I know it is possible to record tests using Selenium. In RobotFramework, it says, "it is not possible". I mean even for a simple login test, I need to write the test, specifying the id of username, password and submit button.
However, is there any way by which these tests can be recorded using robotframework? such as clicking on a text box, entering a string and then clicking on submit button etc., and automatically generate the test case source code instead of having me to write the test cases. Is this possible with robotframework or any external library that it supports?
robotframework wasn't designed to be a record-and-play tool, and has nothing built-in to support that.
There was someone who wrote a selenium IDE plugin that would generate robot keywords, but that was years ago. The github repository is here: https://github.com/denschu/selenium-ide-format-robotframework
The code hasn't been touched since 2012, so I doubt it's of much use.
Using this Firefox add-on, FireRobot we can generate most of the code and also using this you can select the elements on the screen and get related code suggestions on right click like
Wait Until Element Is Visible
Click Element
and all operations to perform on the selected element.

Selenium IDE Custom error messages

I have read this (How to customize Selenium test error/fail message) question and it gave me some hope but can this be done with selenium IDE also? My boss wants to automate all tests but wants to keep it simple for non programmers to use so I cannot use WebDriver or jUnit.
I had a similar issue and came out with a surprisingly amusing answer. Selenium will write a failure only upon stepping on an error. In the current case I wanted Selenium to warn me if the 'Log In' button was absent on my page but a gotoIf wasn't going to do the job alone. Therefore I forced Selenium into an error by writing a click command that didn't exist 'TestLoginB2B failed because the login button was' and using it as my custom error line as Selenium will mention the name of a failed click command and always write them in red therefore allowing my file logging addon to spot them.
Custom error message

Displaying all tests names on Bamboo

Is there a way to display all tests names in Bamboo, instead of only the names of the failed/fixed tests. When I browse to the tests section of the result page of the build, only the total number of tests is displayed, e.g. '30 tests in total'. What I actually want to see is a list of all tests performed.
Go to your build results, choose the test tab and click on the small arrow on the left of the screen.
A navigator will show up.
Click on the job for which you want to see the test results and a list with all tests will show up in the right part of the screen.
The way I did this was to go to the Logs section for the test, and click Download.
Then, for TestNG which reports PASSED/FAILED I did:
grep -P "(PASSED|FAILED):" xxxxx.log
I agree though, it would be helpful to see which tests actually ran from within Bamboo.

Why are Selenium IDE playback controls inactive? (How can I run recorded tests?)

I started learning how to use Selenium today. I have never used it before. I downloaded the Selenium IDE (1.0.10) plugin for FireFox (3.5.16). The way it's behaving is not matching up to the docs.
When I click the record button and perform actions in my browser, nothing happens in the IDE (nothing is recorded). (Actually, initially it did record, but now it doesn't) I tried restarting FireFox and that had no effect.
Also, the main controls are now inactive. I've included a screen shot to show what I mean by that. The controls remain inactive even it I click or double click on the name of a test case in the panel on the left.
And one final question -- it appears that a Selenium test case mentions Chrome in its default configuration even though the docs say you can only record tests using FireFox. Should I do anything about that?
If anyone can shed light on any of the above mysteries I would appreciate it. Thanks!
UPDATE
I restarted FireFox again and now it's recording actions, but the controls are still greyed-out as in the screenshot, so I can't play back the test.
The issue is that you are not in the HTML runner mode. The IDE has no concept of ruby or python or c# or Java. That is up to plugins which just essentially do a find an replace.
*chrome means Firefox Chrome. Something that has been around for a lot longer than Google Chrome the browser. It means use the browser chrome which removes a couple sandboxing issues.
If you want to play back the tests you can't go out of the table mode otherwise the IDE won't understand what to do. The code in the screenshot should be stored in a .rb file and that should be executed.
Let me try to unravel mysteries -
As soon as you launch the IDE it would be in recording mode. Do you see last Red button which is enabled.
IDE Tests can be executed only when in the selenese/html format (aka table format). I guess you have changed the format to ruby (I guess so), from Option > Format.
To be able to execute tests change it back to html from option > Format > HTML
Take my words, IDE is only and only for firefox