January 1, 2012

Test WF Formatting

Embedding a table

Remove all border="0" width="50%" etc. from the table html and use inside an embed.

Selenium Sahi
Works only on Firefox Works on all browsers (IE, FF, Chrome, Safari, Opera)
Has trouble recording IFrames, Frames and popup windows Can record on IFrames, Frames and popup windows
For Frames and IFrames, need to explicitly selectFrame Implicit smart identification of elements even across Frames and IFrames
Uses XPath for identification of elements if id or name not present Uses various algorithms to uniquely identify elements in a simple human recognizable way

Nested List

  • Hi there
  • Nested List - Use SHIFT + ENTER
    > Check Indent of this. (SHIFT + SPACE) for adding white space
    > Next Line
    > If the line is too long and flows to next line do not use SHIFT+SPACE. Other wise it will start wrapping weirdly when the browser size changes. You can see how the sentence wraps on this line.
  • Back to normal

Embedding code

New way for code. The code blocks below have just been italicized via the formatting toolbar. Use bold to highlight inside code block.


// File: common.sah

// declare $DEFAULT_USER variable
var $DEFAULT_USER = "test";

// login function declaration
function login($usr, $pwd){
 _click(_link("Login"));
 _setValue(_textbox("username"), $usr);
 _setValue(_password("password"), $pwd);
 _click(_submit("Login"));
}

<browserType>
<name>edge</name>
<displayName>MS Edge</displayName>
<icon>edge.png</icon>
<path>$userDir\bin\launch_edge.bat</path>
<options></options>
<processName>MicrosoftEdge.exe</processName>
<useSystemProxy>true</useSystemProxy>
<capacity>1</capacity>
<force>true</force>
</browserType>

The above has been styled with:

<style>
.article em {
font-family: monospace;
text-decoration: none;
font-style: normal;
white-space: pre-wrap;
}
</style>

Embedding inline code (just use bold)

Introduced property testcase.restart_browser_if_aborted to restart the browser for an aborted test case in a scenario file during playback.

Continue reading