舉報

會員
Selenium WebDriver 3 Practical Guide
SeleniumWebDriverisanopensourceautomationtoolimplementedthroughabrowser-specificdriver,whichsendscommandstoabrowserandretrievesresults.ThelatestversionofSelenium3bringswithitalotofnewfeaturesthatchangethewayyouuseandsetupSeleniumWebDriver.Thisbookcoversallthosefeaturesalongwiththesourcecode,includingademowebsitethatallowsyoutoworkwithanHMTL5applicationandotherexamplesthroughoutthebook.SeleniumWebDriver3PracticalGuidewillwalkyouthroughthevariousAPIsofSeleniumWebDriver,whichareusedinautomationtests,followedbyadiscussionofthevariousWebDriverimplementationsavailable.YouwilllearntostrategizeandhandlerichwebUIusingadvancedWebDriverAPIalongwithreal-timechallengesfacedinWebDriverandsolutionstohandlethem.Youwilldiscoverdifferenttypesanddomainsoftestingsuchascross-browsertesting,loadtesting,andmobiletestingwithSelenium.Finally,youwillalsobeintroducedtodata-driventestingusingTestNGtocreateyourownautomationframework.Bytheendofthisbook,youwillbeabletoselectanywebapplicationandautomateitthewayyouwant.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Chapter 11
- Chapter 10
- Chapter 9
- Chapter 8
品牌:中圖公司
上架時間:2021-08-13 15:18:01
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-08-13 16:08:53
- Other Books You May Enjoy
- Chapter 11
- Chapter 10
- Chapter 9
- Chapter 8
- Chapter 7
- Chapter 6
- Chapter 5
- Chapter 4
- Chapter 3
- Chapter 2
- Chapter 1
- Assessments
- Further information
- Questions
- Summary
- Reading data from an Excel file
- Reading data from a CSV file
- Parameterizing Tests with a Data Provider
- Parameterizing Tests using suite parameters
- Overview of data-driven testing
- Data-Driven Testing with TestNG
- Further information
- Questions
- Summary
- Using Device Cloud to run tests on Real Devices
- Automating for Android
- Automating for iOS
- Installing Appium
- Creating the Android Emulator
- Setting up Android SDK
- Setting up Xcode
- Prerequisites for Appium
- Automating Android application tests
- Automating iOS Application tests
- Automating iOS and Android tests using Appium
- Available software tools
- Different forms of mobile applications
- Mobile Testing on iOS and Android using Appium
- Further information
- Questions
- Summary
- Counting posts
- Deleting a post
- Editing a post
- Adding a new post
- Looking at the test cases
- The DeletePostPage PageObject
- The EditPostPage PageObject
- The AddNewPostPage PageObject
- The AllPostsPage PageObject
- The AdminLoginPage PageObject
- Looking at all the PageObjects
- Working on an end-to-end example of WordPress
- Understanding loadable components
- Keeping the page-specific details off the test script
- Identifying some WebElements on the fly
- Think of methods in PageObjects as services and not as user actions
- The AllPostsPage PageObject
- The AddNewPost PageObject
- Using PageObjects within a PageObject
- Always look for implied services
- Think of a web page as a services provider
- Good practices for the PageObjects design
- Understanding PageFactory
- Using the @FindBy annotation
- What is the PageObject pattern?
- Test case 3 – counting the number of posts on our WordPress blog
- Test case 2 – deleting a post from our WordPress blog
- Test case 1 – adding a new post to our WordPress blog
- Creating test cases for our WordPress blog
- The PageObject Pattern
- Further information
- Questions
- Summary
- Using cloud-based grids for cross-browser testing
- Different ways to specify the configuration
- WaitTimeout for a new session
- Customized CapabilityMatcher
- Waiting for a match of the desired capability
- Hub-configuration parameters
- Setting the browser timeout
- Unregistering an unavailable node
- Setting node health-check times
- Reregistering the node automatically
- Setting the limit on browser instances
- Setting node timeouts
- Setting supported browsers by a node
- Specifying node-configuration parameters
- Configuring Selenium Grid
- Dealing with two nodes with matching capabilities
- Queuing up the request if the node is busy
- Requesting for non-registered capabilities
- Modifying the existing test script to use Selenium Grid
- Understanding the node
- Understanding the hub
- Exploring Selenium Grid
- Setting up Selenium Grid
- Further information
- Questions
- Summary
- Understanding the JSON wire protocol
- Using RemoteWebDriver for Internet Explorer
- Using RemoteWebDriver for Firefox
- Converting an existing test script to use the RemoteWebDriver server
- Understanding the RemoteWebDriver client
- Running the server
- Downloading Selenium Standalone Server
- Understanding Selenium Standalone Server
- Introducing RemoteWebDriver
- Exploring RemoteWebDriver
- Further information
- Questions
- Summary
- Capturing page-performance metrics
- Performing accessibility testing
- Unregistering EventListener with EventFiringWebDriver
- Listening for an exception
- Listening for script execution
- Listening for browser NavigateTo events
- Listening for browser forward-navigation
- Listening for browser back-navigation
- Listening for a WebElement search event
- Listening for the clicked WebElement
- Listening for WebElement value changes
- Exploring different WebDriver event listeners
- Registering multiple EventListeners
- Executing and verifying the events
- Registering EventListener with EventFiringWebDriver
- Creating EventFiringWebDriver and EventListener instances
- Creating a WebDriver instance
- Extending AbstractWebDriverEventListener
- Implementing WebDriverEventListener
- Creating an instance of EventListener
- Introducing the eventFiringWebDriver and eventListener classes
- Understanding WebDriver Events
- Further information
- Questions
- Summary
- The sendKeys method
- The keyDown and keyUp actions
- Learning keyboard-based interactions
- The context click at current location action
- The context click on WebElement action
- The double click on WebElement action
- The double click at current location action
- The dragAndDrop action
- The dragAndDropBy action
- The moveToElement action
- The release on another WebElement action
- The release at current location action
- The click and hold a WebElement action
- The click and hold at current location action
- The click on a WebElement action
- The click at current location action
- The moveByOffset action
- Learning mouse based interactions
- Understanding the build and perform actions
- Exploring Advanced Interactions of WebDriver
- Further information
- Questions
- Summary
- Handling cookies
- Explicit wait time
- Implicit wait time
- Waiting for WebElements to load
- Exploring Navigate
- Handling alerts
- Switching between frames
- Switching among windows
- Locating target windows and Frames
- Taking screenshots
- Exploring the Features of WebDriver
- Further information
- Questions
- Summary
- Filtering and performing actions on WebElements
- Using the Map function to get the text value from elements
- Filtering element attributes
- Filtering and counting WebElements
- Using Stream API with Selenium WebDriver
- Stream.count()
- Stream.min() and Stream.max()
- Stream.collect()
- Stream.map()
- Stream.sort()
- Stream.filter()
- Introducing Java 8 Stream API
- Using Java 8 Features with Selenium
- Further information
- Questions
- Summary
- Writing your first test script for the Safari browser
- Safari Driver
- Writing your first test script for the Edge browser
- Edge Driver
- Understanding IEDriver capabilities
- Writing your first test script for the IE browser
- InternetExplorerDriver
- Adding ChromeExtensions
- Using Mobile Emulation for testing mobile web applications
- Using Headless Mode
- Chrome Driver
- Understanding frozen preferences
- Setting preferences
- Dealing with Firefox preferences
- Storing and retrieving a profile
- Adding the extension to Firefox
- Understanding the Firefox profile
- Using Headless Mode
- Using GeckoDriver
- Firefox Driver
- Different Available WebDrivers
- Further information
- Questions
- Summary
- The isSelected() method
- The isEnabled() method
- The isDisplayed() method
- Checking the WebElement state
- The submit() method
- The clear() method
- The sendKeys() method
- Performing actions on WebElements
- The getTagName() method
- The getSize() method
- The getLocation() method
- The getCssValue() method
- The getText() method
- The getAttribute() method
- Getting element properties and attributes
- Interacting with WebElements
- The By.cssSelector() method
- The By.xpath() method
- The By.tagName() method
- The By.partialLinkText() method
- The By.linkText() method
- The By.className() method
- The By.name() method
- The By.id() method
- Using the By locating mechanism
- Inspecting pages and elements in Google Chrome with Developer Tools
- Inspecting pages and elements with Mozilla Firefox
- Inspecting Elements with Developer Tools
- The findElements method
- The findElement method
- Locating WebElements using WebDriver
- WebElements
- Setting up a project in Eclipse with Maven and TestNG using Java
- Testing Mobile Apps with Appium
- Having developer support and advanced functionalities
- Having better APIs
- Handling the browser
- Differences between Selenium 2 and Selenium 3
- Selenium IDE
- Selenium Server
- Selenium WebDriver
- Selenium Testing Tools
- Introducing WebDriver and WebElements
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- Installing Eclipse
- Installing Java
- 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
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Selenium WebDriver 3 Practical Guide Second Edition
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Selenium WebDriver 3 Practical Guide Second Edition
- Packt Upsell
- Why subscribe?
- PacktPub.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
- Installing Java
- Installing Eclipse
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Introducing WebDriver and WebElements
- Selenium Testing Tools
- Selenium WebDriver
- Selenium Server
- Selenium IDE
- Differences between Selenium 2 and Selenium 3
- Handling the browser
- Having better APIs
- Having developer support and advanced functionalities
- Testing Mobile Apps with Appium
- Setting up a project in Eclipse with Maven and TestNG using Java
- WebElements
- Locating WebElements using WebDriver
- The findElement method
- The findElements method
- Inspecting Elements with Developer Tools
- Inspecting pages and elements with Mozilla Firefox
- Inspecting pages and elements in Google Chrome with Developer Tools
- Using the By locating mechanism
- The By.id() method
- The By.name() method
- The By.className() method
- The By.linkText() method
- The By.partialLinkText() method
- The By.tagName() method
- The By.xpath() method
- The By.cssSelector() method
- Interacting with WebElements
- Getting element properties and attributes
- The getAttribute() method
- The getText() method
- The getCssValue() method
- The getLocation() method
- The getSize() method
- The getTagName() method
- Performing actions on WebElements
- The sendKeys() method
- The clear() method
- The submit() method
- Checking the WebElement state
- The isDisplayed() method
- The isEnabled() method
- The isSelected() method
- Summary
- Questions
- Further information
- Different Available WebDrivers
- Firefox Driver
- Using GeckoDriver
- Using Headless Mode
- Understanding the Firefox profile
- Adding the extension to Firefox
- Storing and retrieving a profile
- Dealing with Firefox preferences
- Setting preferences
- Understanding frozen preferences
- Chrome Driver
- Using Headless Mode
- Using Mobile Emulation for testing mobile web applications
- Adding ChromeExtensions
- InternetExplorerDriver
- Writing your first test script for the IE browser
- Understanding IEDriver capabilities
- Edge Driver
- Writing your first test script for the Edge browser
- Safari Driver
- Writing your first test script for the Safari browser
- Summary
- Questions
- Further information
- Using Java 8 Features with Selenium
- Introducing Java 8 Stream API
- Stream.filter()
- Stream.sort()
- Stream.map()
- Stream.collect()
- Stream.min() and Stream.max()
- Stream.count()
- Using Stream API with Selenium WebDriver
- Filtering and counting WebElements
- Filtering element attributes
- Using the Map function to get the text value from elements
- Filtering and performing actions on WebElements
- Summary
- Questions
- Further information
- Exploring the Features of WebDriver
- Taking screenshots
- Locating target windows and Frames
- Switching among windows
- Switching between frames
- Handling alerts
- Exploring Navigate
- Waiting for WebElements to load
- Implicit wait time
- Explicit wait time
- Handling cookies
- Summary
- Questions
- Further information
- Exploring Advanced Interactions of WebDriver
- Understanding the build and perform actions
- Learning mouse based interactions
- The moveByOffset action
- The click at current location action
- The click on a WebElement action
- The click and hold at current location action
- The click and hold a WebElement action
- The release at current location action
- The release on another WebElement action
- The moveToElement action
- The dragAndDropBy action
- The dragAndDrop action
- The double click at current location action
- The double click on WebElement action
- The context click on WebElement action
- The context click at current location action
- Learning keyboard-based interactions
- The keyDown and keyUp actions
- The sendKeys method
- Summary
- Questions
- Further information
- Understanding WebDriver Events
- Introducing the eventFiringWebDriver and eventListener classes
- Creating an instance of EventListener
- Implementing WebDriverEventListener
- Extending AbstractWebDriverEventListener
- Creating a WebDriver instance
- Creating EventFiringWebDriver and EventListener instances
- Registering EventListener with EventFiringWebDriver
- Executing and verifying the events
- Registering multiple EventListeners
- Exploring different WebDriver event listeners
- Listening for WebElement value changes
- Listening for the clicked WebElement
- Listening for a WebElement search event
- Listening for browser back-navigation
- Listening for browser forward-navigation
- Listening for browser NavigateTo events
- Listening for script execution
- Listening for an exception
- Unregistering EventListener with EventFiringWebDriver
- Performing accessibility testing
- Capturing page-performance metrics
- Summary
- Questions
- Further information
- Exploring RemoteWebDriver
- Introducing RemoteWebDriver
- Understanding Selenium Standalone Server
- Downloading Selenium Standalone Server
- Running the server
- Understanding the RemoteWebDriver client
- Converting an existing test script to use the RemoteWebDriver server
- Using RemoteWebDriver for Firefox
- Using RemoteWebDriver for Internet Explorer
- Understanding the JSON wire protocol
- Summary
- Questions
- Further information
- Setting up Selenium Grid
- Exploring Selenium Grid
- Understanding the hub
- Understanding the node
- Modifying the existing test script to use Selenium Grid
- Requesting for non-registered capabilities
- Queuing up the request if the node is busy
- Dealing with two nodes with matching capabilities
- Configuring Selenium Grid
- Specifying node-configuration parameters
- Setting supported browsers by a node
- Setting node timeouts
- Setting the limit on browser instances
- Reregistering the node automatically
- Setting node health-check times
- Unregistering an unavailable node
- Setting the browser timeout
- Hub-configuration parameters
- Waiting for a match of the desired capability
- Customized CapabilityMatcher
- WaitTimeout for a new session
- Different ways to specify the configuration
- Using cloud-based grids for cross-browser testing
- Summary
- Questions
- Further information
- The PageObject Pattern
- Creating test cases for our WordPress blog
- Test case 1 – adding a new post to our WordPress blog
- Test case 2 – deleting a post from our WordPress blog
- Test case 3 – counting the number of posts on our WordPress blog
- What is the PageObject pattern?
- Using the @FindBy annotation
- Understanding PageFactory
- Good practices for the PageObjects design
- Think of a web page as a services provider
- Always look for implied services
- Using PageObjects within a PageObject
- The AddNewPost PageObject
- The AllPostsPage PageObject
- Think of methods in PageObjects as services and not as user actions
- Identifying some WebElements on the fly
- Keeping the page-specific details off the test script
- Understanding loadable components
- Working on an end-to-end example of WordPress
- Looking at all the PageObjects
- The AdminLoginPage PageObject
- The AllPostsPage PageObject
- The AddNewPostPage PageObject
- The EditPostPage PageObject
- The DeletePostPage PageObject
- Looking at the test cases
- Adding a new post
- Editing a post
- Deleting a post
- Counting posts
- Summary
- Questions
- Further information
- Mobile Testing on iOS and Android using Appium
- Different forms of mobile applications
- Available software tools
- Automating iOS and Android tests using Appium
- Automating iOS Application tests
- Automating Android application tests
- Prerequisites for Appium
- Setting up Xcode
- Setting up Android SDK
- Creating the Android Emulator
- Installing Appium
- Automating for iOS
- Automating for Android
- Using Device Cloud to run tests on Real Devices
- Summary
- Questions
- Further information
- Data-Driven Testing with TestNG
- Overview of data-driven testing
- Parameterizing Tests using suite parameters
- Parameterizing Tests with a Data Provider
- Reading data from a CSV file
- Reading data from an Excel file
- Summary
- Questions
- Further information
- Assessments
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4
- Chapter 5
- Chapter 6
- Chapter 7
- Chapter 8
- Chapter 9
- Chapter 10
- Chapter 11
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-08-13 16:08:53