Dashboard > Selenium > ... > Contributed User-Extensions > debug
Selenium Log In View a printable version of the current page.
debug
Added by Andrey Yegorov, last edited by Andrey Yegorov on Jan 03, 2006  (view change)
Labels: 
(None)

Description

extension adds command 'debug' that will switch the selenium to the 'Step' mode.
Needed if you want to stop execution at some point and proceed in step mode to see details of teh test failure.

Code to add to the user-extensions:

user-extensions.js
Selenium.prototype.doDebug = function( text ) {
    document.getElementById('modeStep').click();
    };

Example:

clickAndWait link=Add
debug  
verifyTextPresent Troubles are here...

Seelnium will stop on command 'debug' so you'll have a chance to take a look at the actual content of the page.

FYI, there's an (undocumented) "break" command which does the same thing.

I think it worth to be documented.

we use selenium tests to help enter data into our system for a variety of reasons (perhaps we are developing a new test case, so we run an existing test case, and then continue with the app from there).

sometimes we want to stop the test at a certain point, so that we can evaluate the page, or change a value.

We added an onclick to the TRs, so that before/during test execution you can double click a row, and it will insert the "break" command. This allows you to set a breakpoint in any test, wherever you want.

A cool thing about this is that you can do lots of things in the system, and as long as you end up back on the page where the break point was set, you can contiune running the test from there.

This has proven to be a very helpful addition (for our QA teams, development, and even business people that want to use the test to seed the app with some fresh data, but they just want to change a few values)

Posted by john at Jan 14, 2006 10:56

I think selenium has problems when writing to WYSIWYG widgets like Xinha and HTMLArea. In cases like that a "Break" or "Debug" command is useful to let the QA person enter the test value for selenium.

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators