trying to get href using selenium

developer

I am trying to get href but they give me nothing these is page link https://www.nascc.aisc.org/trade-show

import time
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait


driver = webdriver.Chrome("C:\Program Files (x86)\chromedriver.exe")
URL = 'https://www.nascc.aisc.org/trade-show'
driver.get(URL)

page_links =[element.get_attribute('href') for element in
                      driver.find_elements(By.XPATH, "//table[@class='ffTableSet table table-striped']//a[starts-with(@href, 'https://n2a.goexposoftware.com/events/nascc23/goExpo/exhibitor')]")]

print(page_links)
    
Michael Mintz

Here's how to avoid dealing with iframes on that page: (Go directly to the inner site)

from selenium import webdriver

driver = webdriver.Chrome()
URL = 'https://n2a.goexposoftware.com/events/nascc23/goExpo/public/listExhibitorsFrame.php'
driver.get(URL)
page_links = [element.get_attribute("href") for element in
                driver.find_elements("css selector",
                    '[href*="nascc23/goExpo/exhibitor"]')]
print(page_links)
driver.quit()

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

get the href link after traversing through divs using selenium in python

How to Get the href attribute of the element using Selenium and Python

Get all the product's href from AliExpress using selenium

Trying to get Get text out using selenium in Python 3

Trying to get Get text out of div class using selenium in python

Selenium trying to get elements

Trying to get li urls from ul using selenium

Error when trying to to get html element using selenium

Trying to get website calendar data using Selenium in python2.7

trying to get current value of dropdown menu in C# using Selenium

Python selenium - get text and href

Python Selenium - get href value

Get href link with selenium (python)

Why do I get an error when trying to retrieve href values, after doing "select" to put all "a" tags in list? BeautifulSoup Selenium Python

Trying to get the href attribute value of parent element

Trying to just get Text from Href

Why can't I get the href attribute of an element where as I can click on it using Selenium

How to get all the 'href' links with the help of using Following siblings in selenium Python

How do I get the onclick text from <a href onclick="sometext" in Java using selenium

How do I get href attribute value from the given HTML using Python+Selenium?

Python Selenium Get All "href" attributes

Get href from anchor XPath(selenium python)

Python selenium get text from href element

Selenium get three text values with inconsistent href

How to get id from href (selenium)

i m trying to find element href by selenium in java

How to locate the href element using selenium python

Fetch all href link using selenium in python

Using Selenium to select an element with javascript in the href