From the course: Playwright Python and Pytest for Web Automation Testing: Master Modern Web Testing with Playwright and Pytest in Python

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Locate email data

Locate email data

Now that we have figured out the selectors for the new one and the old one, we can go ahead and select the data inside of the e-mail that is the sender name and the short title. So let's go ahead and pull in the developer tools and then we can go ahead and inspect this data right here you can see it is a span element which has our data and if you take a look at the attributes you can see it has a class a translate and an e-mail attribute now we can go ahead and make use of the same but if we take a look at the parents that is you can see it is inside of a td that is short for table data and table data is inside of our table row which is actually our e-mail element so now let's go ahead and select this data out to do that we can simply use the first e-mail locator inside of a table data, we have our span with a e-mail attribute that is this right here. Now we will not specify the attributes value, we'll only say select a span which has a e-mail attribute inside of it. I go ahead and…

Contents