Selenium
Professional
TABLE OF CONTENTS
1. Introduction............................................................................................................................. 4
1.1 Testing Automation tools................................................................................................................ 4
1.2 Selenium Evolution....................................................................................................................... 4
1.3 Introducing Selenium.................................................................................................................... 5
1.4 Selenium’s Tool Suite.................................................................................................................... 5
1.5 Supported Browsers and Platforms.................................................................................................. 6
2.
Selenium IDE.......................................................................................................................... 9
2.1 Installation.................................................................................................................................. 9
2.2 Selenium-IDE Introduction........................................................................................................... 11
2.3 IDE interface and components....................................................................................................... 12
2.4 Building Test Cases..................................................................................................................... 15
2.5 Running Test Cases..................................................................................................................... 17
2.6 Selenium Commands – “Selenese”.................................................................................................. 18
2.7 Commonly Used Selenium Commands............................................................................................ 21
3.
Locating Elements................................................................................................................ 29
3.1 Locating Elements....................................................................................................................... 29
3.2 Locating by XPath....................................................................................................................... 31
3.3 Locating by DOM....................................................................................................................... 32
3.4 Locating by CSS.......................................................................................................................... 33
4.
Regular Expressions............................................................................................................. 35
4.1 Matching Text Patterns................................................................................................................. 35
4.2 Using exact:............................................................................................................................... 35
4.3 Globs....................................................................................................................................... 35
4.4 Regular Expression..................................................................................................................... 36
5.
JavaScript Usage.................................................................................................................... 39
5.1 Test language specification............................................................................................................ 39
5.2 Browser and variable access by JavaScript......................................................................................... 39
5.3 Event Firing............................................................................................................................... 40
6.
Expanding Selenium............................................................................................................. 42
6.1 Test Suite Creation and Debugging................................................................................................. 42
6.2 User extensions.......................................................................................................................... 44
6.3 Add-ons.................................................................................................................................... 48
7.
Selenium RC.......................................................................................................................... 51
7.1 Concepts and need...................................................................................................................... 51
7.2 Install and Configure RC server..................................................................................................... 52
7.3 Test execution............................................................................................................................ 54
7.4 RC based tests development and
conversion...................................................................................... 58
8.
WebDriver............................................................................................................................. 68
8.1 Introducing WebDriver................................................................................................................ 68
8.2 Configuring Selenium-WebDriver.................................................................................................. 68
8.3 WebDriver API Commands and Operations.................................................................................... 69
8.4 Selenium-WebDriver’s Drivers...................................................................................................... 74
9
Selenium Grid......................................................................................................................... 78
9.1 Selenium Grid Basics................................................................................................................... 78
9.2 Installing selenium grid................................................................................................................. 80
9.3 Configuring selenium grid............................................................................................................. 82
9.4 Executing parallel tests.................................................................................................................. 85
10.
Advance Selenium.............................................................................................................. 89
10.1 Cookie management.................................................................................................................. 89
10.2 Network traffic capture............................................................................................................... 90
10.3 Video and screenshot capture...................................................................................................... 92
No comments:
Post a Comment