Home > Backend Development > Python Tutorial > How to click on first email in gmail inbox in Seleniumbase?

How to click on first email in gmail inbox in Seleniumbase?

WBOY
Release: 2024-02-08 21:10:54
forward
978 people have browsed it

如何在 Seleniumbase 中点击 gmail 收件箱中的第一封电子邮件?

Question content

I am trying to get the id from the html in order to pass it like xpath, but the id is not the same as in chrome

Absolute path is not suitable as it will always be different. Please help:(


Correct answer


As far as I know, there is only one <table> element that has the following xpath and that particular element Which happens to be the element that contains all email elements:

//table[@role='grid']
Copy after login

So to click on the first element I will use the following xpath:

//table[@role='grid']//tr[1]
Copy after login

There may be issues depending on where exactly in the row the click occurs, but I suspect it will fail.

The above is the detailed content of How to click on first email in gmail inbox in Seleniumbase?. For more information, please follow other related articles on the PHP Chinese website!

source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template