Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Selenium
Web Test Tool Training
Discover the automating power of Selenium
Presented by:
Copy Right: 2008, All rights reserved by Kangeyan Passoubady (Kangs). Republishing requires authors permission
Day 2
Quick Tour of Selenium IDE
Advanced Features
Click here Ok
HTML Format
Source is in comma
Separated values Format
GE Test Case1.csv
Select CSV Format
GE Test Case1.csv in
Microsoft Excel
Application
Format an array of
commands to the
snippet of source.
Used to copy the source
into the clipboard.
10
11
|command|value|target|
It starts with a pipe symbol ends with a pipe
symbol
Command and Value separated by a Pipe symbol
Value and Target separated by a Pipe symbol
Discover the automating power of Selenium
Copyright 2008-2010 by Kangeyan Passoubady (Kangs)
12
~~Command~~Value~~Target~~
Double Tilde is the separation Character
Modify the javascript seleniumIDE_CSV.js,
to handle two new formats:
1. STIQ Pipe Format
2. Double Tilde Format
Discover the automating power of Selenium
Copyright 2008-2010 by Kangeyan Passoubady (Kangs)
13
14
function formatCommands(commands) {
var result = ''; var sep = SEPARATORS[options['separator']];
for (var i = 0; i < commands.length; i++) {
var command = commands[i];
if (command.type == 'command') {
switch (sep) {
case '|':
result += sep+command.command + sep + command.target + sep +
command.value + sep+ "\r\n"; break;
case '~~':
result += sep+command.command + sep + command.target + sep +
command.value + sep+ "\r\n"; break;
default:
result += command.command + sep + command.target + sep + command.value +
"\r\n";
}
Now we have added a switch
} }
statement which handles | and
return result;}
~~ delimiters.
Discover the automating power of Selenium
Copyright 2008-2010 by Kangeyan Passoubady (Kangs)
15
16
17
18
19
20
21
Exercise
#5
22
Exercise
#6
23