I'm trying to extract the link address from the hidden button that appears when I hover the mouse over it. The code for this button cannot find the link address at all. Below is the relevant code.
<div><button type="button" class="ant-btn hover-btn btn-open-detail" ant-click-animating-without-extra-node="false"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg><span>상품정보</span></button><button type="button" class="ant-btn hover-btn btn-generate-link"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg><span>링크 생성</span></button></div>
I want to link to the site, but it is meaningless because I can't see it without logging in.
prourl = WebDriverWait(driver, 10).until(EC.presence_of_all_elements_located((By.XPATH, "/html/body/div[1]/div/div/div[2]/div/div/div[1]/div/div/div[2]/div/div/div/div/div/div/section[3]/div/div[2]/div/div/div/div[1]/div[2]/div[1]/div/button[1]")))
for u in prourl:
print(WebDriverWait(u, 10).until(EC.presence_of_element_located((By.TAG_NAME, "a"))).get_attribute('href'))
I tried this once, but it also failed. help