Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97756

I have an error when I am running this code | python selenium

$
0
0

This is the code

from selenium import webdriver

driver = webdriver.Firefox()

driver.get("https://www.amazon.com/s?i=specialty-aps&bbn=16225009011&rh=n%3A%2116225009011%2Cn%3A502394&ref=nav_em_T1_0_4_NaN_2__nav_desktop_sa_intl_camera_and_photo")

productname = driver.find_element_by_class_name("a-size-medium a-color-base a-text-normal")
productprice = driver.find_element_by_class_name("a-price-whole")

num_page_item = productname.len()
for i in range(num_page_item):
    print(productname[i].text + ":" + productprice[i].text + "\n")

driver.close()`

and this is the output

probleme in selenium package in python


Viewing all articles
Browse latest Browse all 97756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>