With reference to this post, I got the solution from @DebanjanB, but however I'm unable to use that solution for all my PRODUCT TYPE, it seems working only for Acrylics and Coal Tar. How can I use It for all the PRODUCT TYPE
This is the solution
1) print([my_elem.get_attribute("innerHTML") for my_elem in WebDriverWait(driver, 5).until(EC.visibility_of_all_elements_located((By.XPATH, "//li[@class='topLevel' and @data-types='Acrylics']//h5[@class]/a[starts-with(@href, '/products/product-details/?prod=')]")))])
But When I use for
print([my_elem.get_attribute("innerHTML") for my_elem in WebDriverWait(driver, 5).until(EC.visibility_of_all_elements_located((By.XPATH, "//li[@class='topLevel' and @data-types='Alkyds']//h5[@class]/a[starts-with(@href, '/products/product-details/?prod=')]")))])
This doesn't works
Any suggestion on how this could work.
Thanks
requestsyou will be easily be able to scrape all the data within seconds. I would at least try my code from the last post, you will see that all data shows up.requestfor extracting all product line without usingselenium, but at the end I want to map all those product list against which PRODUCT TYPE the are, so for that reason I first click a element under PRODUCT TYPE dropdown which acts nothing but like a filter for itliwith the classtopLevelit has adata-typesattribute which tells you the type. You can easily just add that right into the dictionary (look at my answer on the other question). It can still be done withoutseleniumand usingrequestsonly. Like I said ALL data is in theHTMLon therequest.selenium