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:(
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']
So to click on the first element I will use the following xpath:
//table[@role='grid']//tr[1]
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!