selenium-chromedriver

Attempting bi-dialect session, assuming Postel's Law holds true on the remote end & Falling back to original OSS JSON using ChromeDriver and Selenium

心已入冬 提交于 2021-01-28 18:35:13
问题 Below is a snippet of code I'm using to initialize chrome webdriver: System.out.println("Initializing Chrome"); ChromeOptions options = new ChromeOptions(); //options.setBinary("C:/Program Files (x86)/Google/Chrome/Application"); options.addArguments("start-maximized"); options.setExperimentalOption("excludeSwitches",new String[]{"enable-automation"}); options.addArguments("--disable-extensions"); options.addArguments("--disable-infobars"); options.addArguments("--allow-running-insecure

Attempting bi-dialect session, assuming Postel's Law holds true on the remote end & Falling back to original OSS JSON using ChromeDriver and Selenium

匆匆过客 提交于 2021-01-28 18:31:31
问题 Below is a snippet of code I'm using to initialize chrome webdriver: System.out.println("Initializing Chrome"); ChromeOptions options = new ChromeOptions(); //options.setBinary("C:/Program Files (x86)/Google/Chrome/Application"); options.addArguments("start-maximized"); options.setExperimentalOption("excludeSwitches",new String[]{"enable-automation"}); options.addArguments("--disable-extensions"); options.addArguments("--disable-infobars"); options.addArguments("--allow-running-insecure

Why isn't the 'chromedriver' executable in the PATH even after using ChromeDriverManager through Selenium and Python

偶尔善良 提交于 2021-01-28 13:32:13
问题 I'm trying to click the "Launch Earth" button with this block of code. from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager driver = webdriver.Chrome(ChromeDriverManager().install()) from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Web from selenium.webdriver.support import expected_conditions as EC url = 'https://www.google.com/earth/' driver = webdriver.chrome() driver.get(url) wait = WebDriverWait(driver, 10)

org.openqa.selenium.os.UnixProcess checkForError - Selenium doesn't work over jenkins (openshift linux - chrome slave)

情到浓时终转凉″ 提交于 2021-01-28 13:00:40
问题 Selenium code works my local. However it doesn't work over jenkins because of server connection error regarding to jenkins console output. Jenkins has openshift structure and chrome slave. I've set the configuration that selenium would work on chrome node. I've also written the selenium codes as bdd (cucumber). This is how webDriver is initialized: ChromeOptions options = new ChromeOptions(); System.setProperty("webdriver.chrome.driver","/usr/bin/google-chrome"); options.addArguments("-

Unable to type in CKEditor with Selenium + Chrome 62

狂风中的少年 提交于 2021-01-28 12:57:12
问题 In one of my Selenium test cases, I need to type something into a CKEditor text area. It works fine with Chromedriver 2.20 + Chrome 59 . But since I upgraded to Chrome 62, the textarea isn't detected anymore. Selenium doesn't throw any exception, it just doesn't type in the CKEditor and goes on with the next step. Method: WebElement element = driver.findElement(By.cssSelector("some-cute-custom-angular-selector")); new Actions(driver).moveToElement(element).click().perform(); new Actions

Unable to type in CKEditor with Selenium + Chrome 62

流过昼夜 提交于 2021-01-28 12:56:28
问题 In one of my Selenium test cases, I need to type something into a CKEditor text area. It works fine with Chromedriver 2.20 + Chrome 59 . But since I upgraded to Chrome 62, the textarea isn't detected anymore. Selenium doesn't throw any exception, it just doesn't type in the CKEditor and goes on with the next step. Method: WebElement element = driver.findElement(By.cssSelector("some-cute-custom-angular-selector")); new Actions(driver).moveToElement(element).click().perform(); new Actions

Chrome out of memory in selenium - no error thrown [duplicate]

六月ゝ 毕业季﹏ 提交于 2021-01-28 10:50:25
问题 This question already has answers here : How to set memory limit for OOM Killer for chrome? (1 answer) java.lang.OutOfMemoryError: unable to create new native thread error using ChromeDriver and Chrome through Selenium in Spring boot (3 answers) Closed 5 months ago . I have a selenium script using Chrome that runs for a very long time. Eventually, the browser runs out of memory, and I get the "Error code: Out of Memory" page. The problem is, no error is thrown in Python, so I don't know how

Scroll to the end of the infinite loading page using selenium Python

不想你离开。 提交于 2021-01-28 08:12:02
问题 I'm scraping the follower names from the twitter using Selenium and that page is infinite, whenever I scroll down I can see new followers. Somehow I want to go to the bottom of the page so that I can scrap all the followers. while number != 5: driver.execute_script("window.scrollTo(0,document.body.scrollHeight)") number = number + 1 time.sleep(5) usernames = driver.find_elements_by_class_name( "css-4rbku5.css-18t94o4.css-1dbjc4n.r-1loqt21.r-1wbh5a2.r-dnmrzs.r-1ny4l3l") for username in

DeprecationWarning: use options instead of chrome_options error using Brave Browser With Python Selenium and Chromedriver on Windows

梦想与她 提交于 2021-01-28 07:11:46
问题 I want to use Selenium (installed: ver 3.141.0.dist-info) on Python (3.8) which is installed on my Windows 7 64, I Use Brave Browser Version 1.17.73 Chromium: 87.0.4280.67 (Official Build) (64-bit) and Chromedriver (chromedriver_win32-87.0.4280.20) for it, when running the following Py file which I got the code from here, new Brave browser opens up, but I get errors. Any solution to make this works? Appreciate your help. when running this file: from selenium import webdriver driver_path = 'C:

Python Selenium Set Multiple Chrome Preference

荒凉一梦 提交于 2021-01-28 06:25:25
问题 I am trying to set multiple chrome options in my chrome browser. This is what I currently have: prefs = {"download.default_directory" : "Download/Path"} moreprefs = {'safebrowsing.enabled': 'false'} chromeOptions = webdriver.ChromeOptions() chromeOptions.add_experimental_option("prefs", prefs) chromeOptions.add_experimental_option("prefs", moreprefs) self.driver = webdriver.Chrome(chrome_options=chromeOptions) The probblem is it only takes in to account the 1 of the chromeOptions.add