Skip to content
Advertisement

Tag: selenium

How can I print more links from the HTML DOM using Python Selenium?

Html: Python selenium code trials: Output: How print ooooo.pdf and aaaaa.pdf? I want to print more links, what should I do? Answer element_to_be_clickable() returns a single WebElement hence href attribute of only the first matching element is printed. Solution To extract all the href attribute values you have to induce WebDriverWait for visibility_of_all_elements_located() and you can use either of the

How to get the value of an element within a tag?

I want to get the values of data-account and data-id which are elements within play-js tag. elemname = driver.find_elements_by_xpath(‘xpath…/div/play-js’) I tried like below, but I couldn’t get the value. With javascript, I was able to import it with the code below. How can I get the value of an element within a tag rather than the tag itself? Answer You

AttributeError: ‘WebElement’ object has no attribute ‘select_by_value’ selecting dropdown menu using Selenium

I am trying to find menu prices for certain fast food restaurants from this website by different state. There is a dropdown menu where different states are the options. After I select a state (for example, California), I want to web scrape the different prices of their Ice Cream. However, I keep getting the same error message preventing me from

Python Selenium unclickable button

I am working with the following website: www.offerte.smartpaws.ch I am trying to use the French site: www.offerte.smartpaws.ch/fr I have a piece of code that works with the German part but for some reason I get an error when trying to do the same thing on the French side, even if the elements are identical. I have the following code to

Extract href by class Selenium Python

Im trying to get all hrefs that are found the a specific class next to them. Im not really familiar with HTML so I’m having some trouble. Basically the HTML code in inspect is: I’m using the find_elements command to find all lines that include the class “notranslate _0imsa ” like this: I then extract all hrefs from “links” with

Advertisement