What will you learn in this lecture?
In the previous video, we learned how to use C# to find a value in a cell part 2 of this Selenium WebDriver elements identification course. In this video, we’ll have to learn how to use C# to find a value in a cell part 3.
How to Use C# to Find a Value in a Cell Part 3
So to visually convey this, just so you guys understand.
We got our table rows but we want table row two. And then we want… So this is what we want right here guys. This matching with this. And you guys see how it intersects to 150,000. That’s exactly what we have achieved with this algorithm here.
So we get our salary locator. And that will allow us to get our driver dot find by element, salary element. So I’m going to step in. And so now we have our salary element. Let me open it up for you guys. Just so you can see the beauty.
And now you can see the text right here is “one hundred fifty thousand”. And that is how much a software development engineering test makes. And that’s exactly correct as you guys see. And then you can obviously use console dot write line to write that statement out.
And we have solved our problem! How awesome was that! And then basically, it’s going to increment the counter and run through the rest of the loops. But all of those are irrelevant and that solves a problem.
And I can probably wrap this in a function for you guys to make it even better. So let me just actually finish running through it, so that it closes all the browsers and cleans up the drivers and so on. Excellent!
So the other really cool thing about it, right, is if I wrap this mechanism in a function. Is that all? I have to do is change this. So if I’m looking rather for salary, I’m looking what kind of work the software development engineer and tests do.
I just change this column. This value right here. But what if I want the salary of a quality assurance engineer? Then I just change this value right here. And the algorithm is actually going to be exactly the same. But it’s just going to come out with a different result.
Now, how freaking sweet is that, guys!
[Tweet “Learn everything about elements identification with Selenium Webdriver.”]
In the next tutorial, we will cover how to find a table with no ID.
What will you learn in this course?
Are you struggling with working with HTML using Selenium WebDriver? Do you know how to easily identify an element using Selenium WebDrriver? Do you know how to manipulate that web element? Do you know how to perform a drag n’ drop on an element? If not, then these are just a few of the questions that will be answered in this course.
This course is a complete guide on working with web elements in Selenium WebDriver! Once you are finished with this course, you will know how to work with any web elements, any time, on any web application.
“Relevant content that I will be able to apply to my automation tests *immediately*, a VERY effective presentation approach (evolving the same example and comparing/contrasting), and an excellent teacher / presenter. Thank you so much for your time and sharing your knowledge Nikolay!.”
In this course from Ultimate QA, you will learn:
- Basics of HTML
- All the different locator strategies for Selenium WebDriver
- How to identify web elements using Selenium WebDriver
- Master XPath
- Navigation with Selenium WebDriver
- Web element manipulation
- Web element interrogation
- Mouse and keyboard actions with Selenium WebDriver
- Performing actions such as drag n’ drop, drawing, hovering
- Implicit and Explicit waits
- How to properly handle element identification so that your tests are not flaky
- Expected Conditions in Selenium WebDriver
[Tweet “Learn how to correctly identify elements using #Selenium #Webdriver.”]How
Nikolay Advolodkin is a self-driven SDET on a lifelong mission to create profound change in the IT world and ultimately leave a legacy for his loved ones, community, and the world at large. Today, he serves as the CEO and Test Automation Instructor at UltimateQA.com and contributes informative articles to leading test automaton websites like SimpleProgrammer.com and TechBeacon.com