Brief description of locating web elements by using ID, Name, Linktext, partialLinktext, xpath, css, and so on.
- [Instructor] Hello and welcome…to the fifth video of section three.…Locating elements is one of the most…important things you will do.…We can't do anything without…interacting with the elements first,…so locating elements is very important.…Locating elements is obviously done differently…depending on your location strategy.…We can locate an element present in the page…by searching for its name, ID, link text, class,…or we can use a structural way to search for elements.…
Structural searches are done by XPath or by CSS.…Let us go to the documentation.…We will use the class By…and one of its subclasses to locate elements.…Which subclass to use obviously depends…on the way you will execute the search.…The by class will allow you to locate elements…using one of eight ways.…Which one of these you'll end up using the most…depends on your web application.…
I prefer to use an ID if possible.…By name is my second choice.…XPath and CSS are common too.…They would always be an option,…but they are harder to use compared to name and ID.…
Selenium gives developers the power to control web browsers and use them to automate web application testing. As an open-source toolset, Selenium makes it easier for testers to evaluate web applications without putting in any extra time and effort.
Mastering Selenium Testing Tools is all about demystifying the Selenium suite. Learn to verify web applications, control browsers with code, and scale up the testing environment by distributing the execution of web applications on different browsers running on different operating systems.
Author Ripon Al Wasim starts with the Selenium IDE, a Firefox plugin that performs a simple record-and-playback of interactions with the browser. A tester aiming for professional output can use WebDriver, an advanced scripting tool that allows you to locate the elements you need to interact with using their name: id, xPath, or CSS. Next, learn to express the desired behavior using a well-known framework for behavior-driven development (BDD) called Cucumber for Java, which uses a language called Gherkin. Last but not least, Ripon shows how to run tests on the Selenium Server, and walks through a complete working example of Selenium and Cucumber in action, for acceptance testing of a web application.
- Preparing your Selenium test environment
- Using the Selenium IDE
- Scripting in WebDriver
- Locating web elements
- Writing test cases with the Page Object Model
- Enabling continuous delivery with a continuous integration build system
- Working with Cucumber and Gherkin
- Describing features with Cucumber
- Running tests on Selenium Server