selenium

Python | How i get the link of products that doesn't have href with selenium

Python | How i get the link of products that doesn't have href with selenium Question: im trying to scrap a web with but this products don’t have href link: https://es.wallapop.com/app/search?keywords=monitor&filters_source=search_box&latitude=39.46895&longitude=-0.37686 Im using selenium to navigate the web and beautifulsoup to digest the results, but if i want to open every product to get more …

Total answers: 3

Selenium works only when I'm connected to a remote server

Selenium works only when I'm connected to a remote server Question: I am trying to run a simple Selenium chrome-driver test on a remote Ubuntu server (EC2). In order to run the code immediately after rebooting, I define the following crontab entry: @reboot export DISPLAY=:0 && export PATH=$PATH:/usr/local/bin && nohup /usr/bin/python3 /home/ubuntu/test/play/client.py 60 http://192.162.2.2:8080 & …

Total answers: 1

Targeting Accept Policy With Selenium

Targeting Accept Policy With Selenium Question: I am trying to target a button from dekudeals using selenium. Exactly what I’m trying to do is to target the accept button from the site’s policy widnow. Button to click](https://i.stack.imgur.com/I62AI.png). So far I have tried: try: WebDriverWait(driver, 20).until(EC.element_to_be_clickable( (By.XPATH, "//button[text()=’Accept’]"))).click() finally: print(‘Not found :(‘) driver.quit() try: WebDriverWait(driver, 20).until(EC.element_to_be_clickable( …

Total answers: 1

Python Selenium – Select Options not returning all the options

Python Selenium – Select Options not returning all the options Question: I’ve been trying to use Python and Selenium to scrape some prices off a certain website The script I wrote seems to work well but sometimes I get an error on this part of the code : #Select "Date de début" select = Select(driver.find_element("xpath",’//*[@id="startDateSet"]’)) …

Total answers: 1

what is the solution for this the bug:

what is the solution for this the bug: Question: This is the code: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.chrome.service import Service s=Service("C:selenium driverchromedriver.exe") driver = webdriver.Chrome(service=s) driver.get("https://www.selenium.dev/selenium/web/web-form.html") driver.implicitly_wait(5) submit_button = driver.find_element(By.CLASS_NAME, "btn btn-outline-primary mt-3") submit_button.click() This is the error: selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".btn btn-outline-primary …

Total answers: 2

Selenium How to Continue when Not Found

Selenium How to Continue when Not Found Question: I have this code: import selenium.webdriver as webdriver import time import requests from selenium.webdriver.chrome.options import Options from usp.tree import sitemap_tree_for_homepage import os from selenium.webdriver.common.by import By from urllib.parse import urlparse from urllib.parse import parse_qs options = Options() options.add_argument(‘–allow-running-insecure-content’) options.add_argument(‘–ignore-certificate-errors’) driver = webdriver.Chrome() sitemap = ‘https://adesivimoto.eu/sitemap.xml’ next_pages = …

Total answers: 2

Python Selenium: Click element by custom attributes

Python Selenium: Click element by custom attributes Question: I am trying to click this button with Selenium: <button class="MuiButtonBase-root MuiButton-root jss38 MuiButton-contained MuiButton-containedPrimary" tabindex="0" type="button" data-test="unifiedCrazyButton"><span class="MuiButton-label">Let’s get crazy</span><span class="MuiTouchRipple-root"></span></button> I can’t do it by the class name, because there are other buttons with the same class name, and also the xpath value in this …

Total answers: 1

Both selenium and bs4 cannot find div in page

Both selenium and bs4 cannot find div in page Question: I am trying to scrape a Craigslist results page and neither bs4 or selenium can find the elements in the page even though I can see them on inspection using dev tools. The results are in list items with class cl-search-result, but it seems the …

Total answers: 1

How to Load the Earnings Calendar data from TradingView link and into Dataframe

How to Load the Earnings Calendar data from TradingView link and into Dataframe Question: I want to load the Earnings Calendar data from TradingView link and load into Dataframe. Link: https://in.tradingview.com/markets/stocks-india/earnings/ Filter-1: Data for "This Week" I am not able to select the Tab "This Week". Any help ? Asked By: Rohit || Source Answers: …

Total answers: 1

I want to change an attribute and give it a value with selenium

I want to change an attribute and give it a value with selenium Question: I have 19 span with the same attribute data-checked <span id="u25-accordion-panel–61" data-type="checkbox" data-checked style="display: none;"></span> I want to change the attribute in all the spans, I tried with 1 but I get the following error options = webdriver.EdgeOptions() options.add_argument("start-maximized") driver = …

Total answers: 1