Relative Content

Tag Archive for selenium-webdriver

How Firefox is working without gekodriver?

I just started using Selenium after 5 years. I remember selenium doesn’t work without the gekodriver in path. Today I was following the getting started guide from Selenium doc and there were no mention of downloading or setting path for gekodriver executable either. Right now, I don’t have it in path environment variable nor installed at all, yet automation are launching. What changed?

Fail to use selenium open Browser

I tried to use selenium to open a browser crawler, but encountered the following error regardless of using chrome or edge. My code is

I have used Fluent Wait and ignored noSuchElementException also I have used customized function. But the progrm still throws noSuchElementException

//Code driver.get(“https://demoqa.com/elements”); FluentWait<WebDriver> wait = new FluentWait<WebDriver>(driver); wait.withTimeout(Duration.ofSeconds(10)); wait.pollingEvery(Duration.ofSeconds(2)); wait.ignoring(NoSuchElementException.class); //exception ignored Function<WebDriver, WebElement> fun = new Function<WebDriver, WebElement>() { @Override public WebElement apply(WebDriver t) { WebElement element = t.findElement(By.xpath(“//button[contains(@class,’text-danger’)]”)); if (element!=null) { System.out.println(element.getAttribute(“class”)); return element; } long d = System.currentTimeMillis(); System.out.println(d); return element; } }; WebElement element = wait.until(fun); //rest of code **Basically, the […]

raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message: Stacktrace:

`from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time chrome_options = Options() service = Service(executable_path=”chromedriver.exe”) driver = webdriver.Chrome(service=service, options=chrome_options) driver.get(‘https://app.itsdispatch.com/dispatch.php’) WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, “email”))) email_input = driver.find_element(By.ID, “email”) email_input.send_keys(’emails’) password_input = driver.find_element(By.ID, “password”) password_input.send_keys(‘Pass’) time.sleep(5) go_button = […]

Selenium date picker

I am trying to set the custom start and end date to date picker using selenium python. I have tried multiple tries but still not able to get the data with custom dates. It’s returning the data with present dates only.