舉報

會員
Selenium WebDriver Quick Start Guide
SeleniumWebDriverisaplatform-independentAPIforautomatingthetestingofbothbrowserandmobileapplications.Itisalsoacoretechnologyinmanyotherbrowserautomationtools,APIs,andframeworks.ThisbookwillguideyouthroughtheWebDriverAPIsthatareusedinautomationtests.Chapterbychapter,wewillconstructthebuildingblocksofapageobjectmodelframeworkasyoulearnabouttherequiredJavaandSeleniummethodsandterminology.Thebookstartswithanintroductiontothesame-originpolicy,cross-sitescriptingdangers,andtheDocumentObjectModel(DOM).Movingahead,we'lllearnaboutXPath,whichallowsustoselectitemsonapage,andhowtodesignacustomizedXPath.Afterthat,wewillbecreatingsingletonpatternsanddrivers.Thenyouwilllearnaboutsynchronizationandhandlingpop-upwindows.Youwillseehowtocreateafactoryforbrowsersandunderstandcommanddesignpatternsapplicabletothisarea.Attheendofthebook,wetieallthistogetherbycreatingaframeworkandimplementingmulti-browsertestingwithSeleniumGrid.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Next steps
- Welcome Selenium 4
- ByChained Locator
品牌:中圖公司
上架時間:2021-06-24 17:53:34
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-24 18:26:54
- Other Books You May Enjoy
- Summary
- Next steps
- Welcome Selenium 4
- ByChained Locator
- ByAll locator
- Understanding ByIdOrName
- Some extra location techniques in Selenium WebDriver 3
- Using the Ashot API
- Generating screenshots in Selenium
- Creating reports using Fillo
- Adding keywords to the framework
- Creating a custom XL file from testng-results.xml
- Incorporating reporting in the framework
- Implementing logging and reporting in the framework
- Using soft asserts
- Two different types of asserts
- Testing for a negative scenario
- Introducing assertions
- Extending the TestListenerAdapter class
- Implementing the ITestListener interface
- Different types of listeners
- Introducing TestNG listeners
- Having a separate DataProvider class
- DataProviders in TestNG
- Advantages of WebDriverManager
- WebDriverManagerServer
- WebDriverManager as CLI
- WebDriverManager as a Java dependency
- How to use the WebDriverManager library
- Introducing the WebDriverManager library
- Technical requirements
- Hybrid Framework
- Summary
- Emailable report
- Running tests in parallel
- Incorporating Selenium Grid
- A look at testng.xml
- Installing the TestNG plugin for Eclipse
- Introducing the TestNG framework
- A look at the project structure in Eclipse
- Receiver
- Command
- Invoker
- Client
- Introducing the command design pattern
- Technical requirements
- The Command Pattern and Creating Components
- Summary
- Exercise
- Basic setup
- Architecture of the Selenium Grid
- Understanding the Selenium Grid
- First steps toward the framework
- EventFiringWebDriver
- Various scenarios for JavascriptExecutor
- Introducing JavascriptExecutor
- Various scenarios for the actions class
- The actions class
- Builder design pattern
- Technical requirements
- The Actions Class and JavascriptExecutor
- Summary
- Pitfall – Never fall into one
- Exposing the JavascriptExecutor
- Tomcat setup
- A Sample application using JQuery
- A glance at the JQuery library
- Function keyword
- Fluent wait
- Explicit wait
- Synchronization at the WebElement level
- Implicit wait
- Synchronization at the WebDriver-instance level
- Conditional synchronization
- Thread.sleep(long)
- Unconditional synchronization
- Synchronization types
- What is synchronization?
- Technical requirements
- Synchronization
- Summary
- autograntpermissions capability on Android
- Learning the Internet Explorer options
- Learning the Firefox options and the Firefox profile
- Learning Chrome options
- Enabling protected mode settings in Internet Explorer
- The DesiredCapabilities class
- What is a Desired Capability?
- DesiredCapabilities
- Handling mobile app permission alerts
- Understanding frames and iframes
- Handling modal JavaScript alerts
- Handling non-modal jQuery alerts
- Creating JavaScript and jQuery alerts
- Modal and non-modal alerts
- Handling modal popup windows
- Looping through all open windows using the simple for loop
- Looking at the getTitle() method
- Introducing the switchTo() method
- Handling non-modal popup windows
- JavaScript and jQuery alerts
- Modal and non-modal pop-up windows
- Modal and non-modal dialog
- A look at the iterator() method
- Understanding the Set interface
- Fetching the window handles
- Window handles
- Technical requirements
- Handling Popups Frames and Alerts
- Summary
- How to use Extent Reports in code?
- Extent Reports
- Introducing the log4j framework
- Handling errors while running pom.xml
- Triggering the testng XML from within the POM XML file
- Introducing the testng XML file
- Bird's eye view of the framework
- Concept of Map and HashMap
- Understanding the keyword driven framework
- The difference between quit() and close()
- Some common reusable methods
- Important methods in Selenium
- What are Lists in java?
- What are method signatures?
- Technical requirements
- Basic Selenium Commands and Their Usage in Building a Framework
- Summary
- Debugging in Eclipse
- Introducing the Fillo API
- What is a WebView?
- Mobile locators
- How to use UIAutomatorViewer
- Appium Inspector window
- How to use Screencast
- Connecting the actual mobile device
- Finding XPaths for mobile browser applications
- XPaths for mobile applications
- Prerequisites for automating mobile applications
- Properties file for WebElements
- Extracting WebElements dynamically using tagName
- Best practice
- Finding elements within the container element
- Understanding the text() methods
- An example traversal
- Customized CSS
- Understanding customized XPaths
- The two types of XPaths
- Dissecting the By class
- DOM traversal
- SearchContext interface
- WebElements
- What is the DOM?
- Technical requirements
- Understanding the Document Object Model and Creating Customized XPaths
- Summary
- Creating the first script
- Manual configuration
- Understanding pom.xml
- Creating a Maven project
- Downloading Eclipse
- Setting up Eclipse
- Installing Java 8
- Preparing for the very first script
- Why do we need headless browsers?
- Headless browsers
- Mobile drivers
- Remote WebDriver
- Drivers in Selenium
- Class structure of Selenium WebDriver
- Introducing Selenium WebDriver
- What is cross-site scripting (XSS)?
- Understanding Selenium RC
- Streams in Java 8
- The forEach method for a collection
- Default and static methods in an interface
- Functional interfaces
- Lambda expressions and functional interfaces
- What's new in Java 8
- Some pointers on Selenium
- Advantages of test automation
- Why is test automation required?
- Technical requirements
- Introducing Selenium WebDriver and Environment Setup
- Reviews
- Get in touch
- Conventions used
- Code in action
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- Packt.com
- Why subscribe?
- Packt Upsell
- Selenium WebDriver Quick Start Guide
- coverpage
- coverpage
- Selenium WebDriver Quick Start Guide
- Packt Upsell
- Why subscribe?
- Packt.com
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Code in action
- Conventions used
- Get in touch
- Reviews
- Introducing Selenium WebDriver and Environment Setup
- Technical requirements
- Why is test automation required?
- Advantages of test automation
- Some pointers on Selenium
- What's new in Java 8
- Lambda expressions and functional interfaces
- Functional interfaces
- Default and static methods in an interface
- The forEach method for a collection
- Streams in Java 8
- Understanding Selenium RC
- What is cross-site scripting (XSS)?
- Introducing Selenium WebDriver
- Class structure of Selenium WebDriver
- Drivers in Selenium
- Remote WebDriver
- Mobile drivers
- Headless browsers
- Why do we need headless browsers?
- Preparing for the very first script
- Installing Java 8
- Setting up Eclipse
- Downloading Eclipse
- Creating a Maven project
- Understanding pom.xml
- Manual configuration
- Creating the first script
- Summary
- Understanding the Document Object Model and Creating Customized XPaths
- Technical requirements
- What is the DOM?
- WebElements
- SearchContext interface
- DOM traversal
- Dissecting the By class
- The two types of XPaths
- Understanding customized XPaths
- Customized CSS
- An example traversal
- Understanding the text() methods
- Finding elements within the container element
- Best practice
- Extracting WebElements dynamically using tagName
- Properties file for WebElements
- Prerequisites for automating mobile applications
- XPaths for mobile applications
- Finding XPaths for mobile browser applications
- Connecting the actual mobile device
- How to use Screencast
- Appium Inspector window
- How to use UIAutomatorViewer
- Mobile locators
- What is a WebView?
- Introducing the Fillo API
- Debugging in Eclipse
- Summary
- Basic Selenium Commands and Their Usage in Building a Framework
- Technical requirements
- What are method signatures?
- What are Lists in java?
- Important methods in Selenium
- Some common reusable methods
- The difference between quit() and close()
- Understanding the keyword driven framework
- Concept of Map and HashMap
- Bird's eye view of the framework
- Introducing the testng XML file
- Triggering the testng XML from within the POM XML file
- Handling errors while running pom.xml
- Introducing the log4j framework
- Extent Reports
- How to use Extent Reports in code?
- Summary
- Handling Popups Frames and Alerts
- Technical requirements
- Window handles
- Fetching the window handles
- Understanding the Set interface
- A look at the iterator() method
- Modal and non-modal dialog
- Modal and non-modal pop-up windows
- JavaScript and jQuery alerts
- Handling non-modal popup windows
- Introducing the switchTo() method
- Looking at the getTitle() method
- Looping through all open windows using the simple for loop
- Handling modal popup windows
- Modal and non-modal alerts
- Creating JavaScript and jQuery alerts
- Handling non-modal jQuery alerts
- Handling modal JavaScript alerts
- Understanding frames and iframes
- Handling mobile app permission alerts
- DesiredCapabilities
- What is a Desired Capability?
- The DesiredCapabilities class
- Enabling protected mode settings in Internet Explorer
- Learning Chrome options
- Learning the Firefox options and the Firefox profile
- Learning the Internet Explorer options
- autograntpermissions capability on Android
- Summary
- Synchronization
- Technical requirements
- What is synchronization?
- Synchronization types
- Unconditional synchronization
- Thread.sleep(long)
- Conditional synchronization
- Synchronization at the WebDriver-instance level
- Implicit wait
- Synchronization at the WebElement level
- Explicit wait
- Fluent wait
- Function keyword
- A glance at the JQuery library
- A Sample application using JQuery
- Tomcat setup
- Exposing the JavascriptExecutor
- Pitfall – Never fall into one
- Summary
- The Actions Class and JavascriptExecutor
- Technical requirements
- Builder design pattern
- The actions class
- Various scenarios for the actions class
- Introducing JavascriptExecutor
- Various scenarios for JavascriptExecutor
- EventFiringWebDriver
- First steps toward the framework
- Understanding the Selenium Grid
- Architecture of the Selenium Grid
- Basic setup
- Exercise
- Summary
- The Command Pattern and Creating Components
- Technical requirements
- Introducing the command design pattern
- Client
- Invoker
- Command
- Receiver
- A look at the project structure in Eclipse
- Introducing the TestNG framework
- Installing the TestNG plugin for Eclipse
- A look at testng.xml
- Incorporating Selenium Grid
- Running tests in parallel
- Emailable report
- Summary
- Hybrid Framework
- Technical requirements
- Introducing the WebDriverManager library
- How to use the WebDriverManager library
- WebDriverManager as a Java dependency
- WebDriverManager as CLI
- WebDriverManagerServer
- Advantages of WebDriverManager
- DataProviders in TestNG
- Having a separate DataProvider class
- Introducing TestNG listeners
- Different types of listeners
- Implementing the ITestListener interface
- Extending the TestListenerAdapter class
- Introducing assertions
- Testing for a negative scenario
- Two different types of asserts
- Using soft asserts
- Implementing logging and reporting in the framework
- Incorporating reporting in the framework
- Creating a custom XL file from testng-results.xml
- Adding keywords to the framework
- Creating reports using Fillo
- Generating screenshots in Selenium
- Using the Ashot API
- Some extra location techniques in Selenium WebDriver 3
- Understanding ByIdOrName
- ByAll locator
- ByChained Locator
- Welcome Selenium 4
- Next steps
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-24 18:26:54