css-selectors

How to find an element with multiple class names using Xpath or CssSelector

How to find an element with multiple class names using Xpath or CssSelector Question: I want to access this element: div data-v-658f4ceb="" class="trn-gamereport-list trn-gamereport-list–compact"> I know that since it has multiple names in the class I would need to use either the XPath or CSS selector method to access it but whenever I try either …

Total answers: 1

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

Locating and Find Element with dynamic ID using selenium in Pyhton

Locating and Find Element with dynamic ID using selenium in Pyhton Question: How to find and select an element that has a dynamic ID, that always changing every reloading the page, this is the ID i want to select id=x-auto-234-input but the 3 digit number always changing, Any ideas? Below is the script <div role="presentation" …

Total answers: 2

Selenium cant find element with xpath or ClassName or Css Selector (Python)

Selenium cant find element with xpath or ClassName or Css Selector (Python) Question: Hello I am trying to click The no thanks button on google look : enter image description here The full element of the button is this <button aria-label="No thanks" class="M6CB1c rr4y5c" jsname="ZUkOIc" jslog="71121; track:click;" data-dismiss="n">No thanks</button> I tried to select it with …

Total answers: 1

How to use BeautifulSoup to find "Description" by div class_=css-gz8dae?

How to use BeautifulSoup to find "Description" by div class_=css-gz8dae? Question: I am new to Python that I am learning for scraping purposes. I am using BeautifulSoup to collect descriptions from job offers at: https://justjoin.it/offers/itds-net-fullstack-developer-angular On another site with job offers, using the same code with different div classes I can find what I need. …

Total answers: 2

python selenium add value to attribute named value

python selenium add value to attribute named value Question: I want to add with python selenium framework, to input tag’s value attribute equals let’s say New York, NY. I guess I need for it, like driver.execute_script("arguments[0].setAttribute(‘value’,arguments[1])",element, value) but do not know how to use it. Any kind of support will be appreciated <input type="text" role="combobox" …

Total answers: 1

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

How to avoid click intercept while sending text to email field using Selenium in headless mode

How to avoid click intercept while sending text to email field using Selenium in headless mode Question: I want to connect website. I write the following code: from time import sleep from fake_useragent import UserAgent from selenium.webdriver.support.ui import WebDriverWait as W from selenium.webdriver.support import expected_conditions as E from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("–start-maximized") …

Total answers: 2

Selenium Python: How to close the overlay by clicking on the svg element

Selenium Python: How to close the overlay by clicking on the svg element Question: I am looking for a way to click on the svg cross to close overlaying welcome window. I managed to go through login and authorization but this cross is getting me crazy. Code trials: WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CLASS_NAME, "jss109"))).click() WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//svg[@class=’jss109′]"))).click() WebDriverWait(driver, …

Total answers: 1

How to find element by XPATH using variable Selenium

How to find element by XPATH using variable Selenium Question: I’m trying to parse some elements using XPATH This is my python code: driver.get("http://watir.com/examples/shadow_dom.html") shadow_host = driver.find_element(By.XPATH, ‘//*[@id="shadow_host"]’) shadow_root1 = shadow_host.shadow_root shadow_host1 = shadow_root1.find_element(By.XPATH, ‘/span’) selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid locator I know that I can use CSS Selectors, but I want to use it …

Total answers: 1