0% found this document useful (0 votes)
43 views

Selenium Environment, Data and Parameterization: Storetablecontent

This document discusses Selenium data-driven testing and parameterization. It explains that data files store test data in an HTML table format with variable names and values. Variables can be stored from the data file using the storeTableContent command and then referenced using ${variable} syntax in test scripts. Environment files contain environment settings that are inputs to Selenium test scripts along with data files.

Uploaded by

geongeo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Selenium Environment, Data and Parameterization: Storetablecontent

This document discusses Selenium data-driven testing and parameterization. It explains that data files store test data in an HTML table format with variable names and values. Variables can be stored from the data file using the storeTableContent command and then referenced using ${variable} syntax in test scripts. Environment files contain environment settings that are inputs to Selenium test scripts along with data files.

Uploaded by

geongeo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Selenium Environment, Data and Parameterization

What is Data file ? It is an HTML file where data is stored in a tabular format. This avoids data value modifications in the Selenium core file. It is comprised of 2 parts, The Variable Name The Data Value Example: <tr><td>username</td><td>admin</td></tr> How to Open a File to read? The open Command: Syntax: open(target/Element locators, Value) Example: <tr> <td>open</td> ---This is the command / accessor <td>http://www.google.com</td> ---This is the target / Element locators <td></td> ---This is the value </tr> How to store values which are present in Data File to Variables? storeTableContent This is a Java script function which can store values present in a table to user defined variables. Syntax: <tr> <td>storeTableContent</td> <td>tableDataName</td> <td>userDefined_Variable</td> </tr>

Example: <tr> <td>storeTableContent</td> <td>sAdmin_Report/0/1/.*/0</td> <td>sReportName</td> </tr> How to call Variables? To call a variable, use the variable name inside a braces and put the Dollar symbol before the braces. Syntax: <tr> <td>command</td> <td>Locator</td> <td>${userDefined_variable1}</td> </tr> <tr> <td>command</td> <td>${userDefined_variable2}</td> <td></td> </tr> Selenium Environment Files Environment files are part of the Selenium frame work where we can find all the environment related stuffs in order to run a Selenium core file. The Environment files and Data Files are inputs to the Selenium Scripts, which inturn talk to the Application

You might also like