I'm currently working on a project with Selenium and bs4. So far so good I can navigate through the website using selenium without any problem however, I would need to click on a specific icon that opens a new tab with some information that I would need to scrape using BS4. My issue is when looking at the HTML I have no idea what to locate with Selenium in order to click on that icon.
HTML sample:
<a onmouseover="XYZ.Util.showHoverText(this, 'Print view')" href=
"app/exports/timesheet_print.php?startDate=2020-09-07&endDate=2020-09-11&filter_user=110483" target="_blank">
<img src="images/icons/printer.png" class="icon">
</a>
Usually I'm locating items by name, ID or Class but in that case I don't know what to chose from.
Should I look for the xpath instead ?