I am new to web scraping and I try to open a link with selenium:
On Google Chrome I use inspect on the button I want to open and I get the following information:
<a href="/c#candidates?id=a6b0e325a499&candidateFilter=4af15d8991a8" data-tn-link="true" data-tn-element="view-unread-candidates"><span class="jobs-u-font--bold">(4 awaiting review)</span></a>
I try to get all the links with the same structure and open it so I can access its data
(I have several button with the same structure but different href that I need to see)
Also under Properties I can see a for the same button.
However I want to be more precise than just using as I want only those particular links mentioned above:
elements = driver.find_elements_by_tag_name("a")
Can anyone advise ?


xpath = "/html/body/div[@id='wrapper']/div[@id='page_frame']/div[@id='page_content']/div[@class='page-wrapper']/div[@id='mc']/div[@id='plugin_container_MainContent']/div[@class='plugin-hadesinternal']/div/div/div[@class='jobs-JobsTab-main']/table[@class='jT cSST']/tbody/tr[@class='job-row'][3]/td[@class='candidates']/div/a[1]" selected_option = driver.find_element_by_xpath(xpath)But can't open in a new tab or open and return to my previous page or open with BeautifulSoup...selected_option = driver.find_element_by_xpath(xpath) url = selected_option.get_attribute("href") driver.execute_script("window.open('" + url + "');")