selenium-webdriver

How to click a button in html within an iframe using Selenium

How to click a button in html within an iframe using Selenium Question: I need to extract some values from a website, and to do so, I have to click on a button on that page. However, there seems to be an issue. I noticed that when I hit F12, I can identify the specific …

Total answers: 1

How to set up geckodriver with Selenium in google-colaboratory?

How to set up geckodriver with Selenium in google-colaboratory? Question: For some context, I’m using Google Collab to try to make a webscraper, and for that I want to use selenium. But I can’t seem to set up the web driver properly. Google uses Ubuntu servers I believe. This is my first time trying to …

Total answers: 1

Selenium unable to stop page loading

Selenium unable to stop page loading Question: I do not face this problem with other websites but on this specific website: 1- I want to get my internet speed while using speedtest website by Selenium but the page cant stop loading. Because of that, I think that reason that I can’t get the website elements. …

Total answers: 3

Differentiate by section class in Selenium

Differentiate by section class in Selenium Question: Im facing a problem in Python selenium, I would like to print on my code the following data, an email address: [email protected] I just need a hint, that’s all… HTML: <section tabindex="-1" class="pv-profile-section pv-contact-info artdeco-container-card"> <!—-> <h2 class="text-body-large-open mb4"> InformaciĆ³n de contacto </h2> <div class="pv-profile-section__section-info section-info" tabindex="-1"> <section …

Total answers: 2

Python Selenium unable to locate element even thought it shows up in inspect tab

Python Selenium unable to locate element even thought it shows up in inspect tab Question: I run a query to a webpage and selenium opens the page and I wait till all the scripts are loaded. Then I perform a tag search and by far I’ve tried every method but it always returns selenium.common.exceptions.NoSuchElementException: Message: …

Total answers: 1

Python selenium string formatting in web element

Python selenium string formatting in web element Question: How do I iterate over multiple div web elements? I want to collect EPA Registration numbers (ex: 12455-61, 12455-61-3240) using a for loop, but I get error that the web element cannot be located using string formatting. Here’s the HTML: <div class="product"> <div class="mainSection"><p><span class="reportLabel">EPA Registration #:</span> …

Total answers: 2

Attribute Error : 'str' object has no attribute '_ignore_local_proxy' with ChromeDriverManager

Attribute Error : 'str' object has no attribute '_ignore_local_proxy' with ChromeDriverManager Question: I’ve just started with Selenium and I’m already stuck at the first step: setting up the driver. I keep getting this error: ‘str’ object has no attribute ‘_ignore_local_proxy’. Here’s the code : from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager import requests driver …

Total answers: 2

Infinite scrolling of webpage using Selenium Python

Infinite scrolling of webpage using Selenium Python Question: I want to scroll till all the element is loaded. My code works well for starting till 7 8 pages using this code. driver.get(‘https://www.bigbasket.com/ps/?q=rice’) last_height = driver.execute_script("return document.body.scrollHeight") while True: # Scroll down to bottom driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") # Wait to load page WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, ‘//div[@class="show-more"]/button’))) driver.find_element_by_xpath(‘//div[@class="show-more"]/button’).click() # …

Total answers: 2

Selenium Can't Find element by Xpath?

Selenium Can't Find element by Xpath? Question: I’m trying to click a button to automatically export a csv file from this site. I’ve tried finding the element by button name and by Xpath, but the "NoSuchElement" Exception is raised. I’ve tried variations of WebdriverWait and time.sleep to ensure the button loads, and used the xPath …

Total answers: 1

Selenium Python: How to capture li element with specific text

Selenium Python: How to capture li element with specific text Question: I am trying to extract urlToBeCaptured and Text to be captured from the HTML. The structure looks as follows: <li> " text with trailing spaces " <a href="urlToBeCaptured"> <span class ="class1> Text to be captured </span> <span class ="class2> Another text </span> </a> … …

Total answers: 1