Using XPATH in a single line: driver. To print the value of the src attributes you have to induce WebDriverWait for the visibility_of_all_elements_located() and you can use either of the following Locator Strategies:
#3 in 1 bluetooth credit card reader android
The product links are contained within the src attribute. Cheap Smart 3 In 1 Mobile Bluetooth Credit Card Reader With Ios Android Sdk Magnetic/chip/nfc Reader, Find Complete Details about Cheap Smart 3 In 1 Mobile Bluetooth Credit Card Reader With Ios Android Sdk Magnetic/chip/nfc Reader,Android Emv Payment Terminal,Android Payment Terminal,Bluetooth Smart Card Reader from Card Reader Supplier or Manufacturer-Shenzhen Zcs Technology Co., Ltd. for link_el in link_elements:įrom import Byįrom import Serviceįrom webdriver_manager.chrome import ChromeDriverManagerĭriver = webdriver.Chrome(service=Service(ChromeDriverManager().install())) To get product links you can use this locator strategy using xpath. Link_elements=driver.find_elements(By.NAME,'product-item')Īctually, the problem was element locator selection. # Then find all of the elements with this name Link_element = wait.until(EC.presence_of_element_located((By.NAME, 'product-item') # This will wait for the specified element to appear, but note just because this element has loaded does not mean that the elements below this element have loaded
![3-in-1 bluetooth credit card reader 3-in-1 bluetooth credit card reader](https://p.globalsources.com/IMAGES/PDT/B5210167069/Smart-card-reader.jpg)
Wait = WebDriverWait(driver, maxTimeToWait) # Create a wait object with a specified maximum time to wait Or you can wait for a specific element to load on the webpage using the following: # New Imports to addįrom import expected_conditions as ECįrom import WebDriverWait
![3-in-1 bluetooth credit card reader 3-in-1 bluetooth credit card reader](https://cdn.shopify.com/shopifycloud/help/assets/manual/sell-in-person/hardware/chip-swipe-reader/chip-swipe-reader-2c217ed248cd322f5b276cd278ac431fe0ace916598f8e6e4d8121f791346721.png)
Add a time.sleep() after your driver.get() import time
![3-in-1 bluetooth credit card reader 3-in-1 bluetooth credit card reader](https://image.made-in-china.com/2f0j00TSHhtcPFZiby/3-in-1-Bluetooth-Interface-Smart-Mobile-NFC-Credit-Card-Reader-I9-.jpg)
You instantly try and search for product-item before the webpage has a chance to fully load.