Selenium HP Web Test Tool Training

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Session Variables Storing Session Variables on the Server.
Lesson 4: Formatting Input Data for Arithmetic
1.1 Lesson – Evaluating Algebraic Expressions
PHP: Hypertext Processor Fred Durao
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Selenium and Selenium on Rails. Agenda  Overview of Selenium Simple Selenium Tests Selenium IDE  Overview of Selenium on Rails  Problems with Selenium.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
PHP Condtions and Loops Prepared by Dr. Maher Abuhamdeh.
Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
Introduction to Mongo DB(NO SQL data Base)
EGR 2261 Unit 11 Pointers and Dynamic Variables
Programming Web Pages with JavaScript
Selenium HP Web Test Tool Training
Selenium and Selenium on Rails
Selenium HP Web Test Tool Training
CIRC Winter Boot Camp 2017 Baowei Liu
Agenda Korn Shell Functions Korn Shell Variables
Selenium HP Web Test Tool Training
Selenium WebDriver Web Test Tool Training
Advanced Web Automation Using Selenium
Selenium WebDriver Web Test Tool Training
Organization of Programming Languages
SECTION 3 MACROS: OVERVIEW.
JavaScript.
Selenium HP Web Test Tool Training
Test Automation For Web-Based Applications
How to Stop the Bullying!
JavaScript Selection Statement Creating Array
Test Automation For Web-Based Applications
Selenium HP Web Test Tool Training
Test Automation For Web-Based Applications
Selenium HP Web Test Tool Training
Test Automation For Web-Based Applications
Unit 6 part 3 Test Javascript Test.
Explicit Application of Procedures, and Explicit Evaluation
Test Automation For Web-Based Applications
Selenium Web Test Tool Training Using Ruby Language
Test Automation For Web-Based Applications
ClueGene: An Online Search Engine for Querying Gene Regulation
Evaluating Expressions
Training & Development
  Introduction  What the generic.  What are the Generic types : - Class - Methods   Type of coding the generic method. - Using the generic method.
Loops and Arrays in JavaScript
Tutorial 10: Programming with javascript
Test Automation For Web-Based Applications
Selenium WebDriver Web Test Tool Training
Learning Intention I will learn about the different types of programming errors.
PHP: Hypertext Preprocessor
Test Automation For Web-Based Applications
Selenium HP Web Test Tool Training
Test Automation For Web-Based Applications
Murach's JavaScript and jQuery (3rd Ed.)
Product Training Program
JavaScript 101 Lesson 8: Loops.
Presentation transcript:

Selenium HP Web Test Tool Training Portnov Computer School Selenium HP Web Test Tool Training Test Automation For Web-Based Applications Presenter: Ellie Skobel

Day 4 Using JavaScript in Selenium IDE Scripts

Selenium Accessors. Some of the key accessors are: storeValue storeEval You can store any value into a variable using accessors. Variable substitution provides a simple way to include a previously stored variable in a command parameter If you give the variable name: var_name Using the variable like: ${var_name} will substitute the actual value in the place of the variable. Use echo ${var_name} to display the values in the Log.

MAP Maps provide a more general way of storing elements. Allows to store pairs of elements, termed "keys" and "values", where each key maps to one value. Cannot contain duplicate keys (duplicate variable names Here Keys refers Selenium variable Names and values refers to their values.

storedVars All the variables are stored in a map named storedVars storedVars allows you to access the ${var_name} using the “varName” key within the map. Using storedVars you can reference the values within Javascript Evaluation code

JavaScript Evaluation JavaScript snippet can be given using the following syntax. Javascript { <code snippet goes here> } The code given is treated as a JavaScript code and executed. storedVars Map can be used to access the previously stored variables Variable substitution should be handled carefully within the JavaScript code.

storedVars Evaluation Example javascript { storedVars['num1'] + storedVars['num2'] }

Eval commands Can be used to process the JavaScript code without using javascript{…} sintax assertEval assertNotEval verifyEval verifyNotEval waitForEval waitForNotEval storeEval

Expression commands assertExpression assertNotExpression Are used to compare two values or variables assertExpression assertNotExpression verifyExpression verifyNotExpression waitForExpression waitForNotExpression storeExpression store waitForCondition