selenium-chromedriver

Clicking a button with Selenium in Python

扶醉桌前 提交于 2020-01-04 15:28:08
问题 Goal : use Selenium and Python to search for company name on LinkedIn's search bar THEN click on the "Companies" button in the navigation to arrive to information about companies that are similar to the keyword (rather than individuals at that company). See below for an example. "CalSTRS" is the company I search for in the search bar. Then I want to click on the "Companies" navigation button. My Helper Functions : I have defined the following helper functions (including here for

Clicking a button with Selenium in Python

☆樱花仙子☆ 提交于 2020-01-04 15:27:25
问题 Goal : use Selenium and Python to search for company name on LinkedIn's search bar THEN click on the "Companies" button in the navigation to arrive to information about companies that are similar to the keyword (rather than individuals at that company). See below for an example. "CalSTRS" is the company I search for in the search bar. Then I want to click on the "Companies" navigation button. My Helper Functions : I have defined the following helper functions (including here for

selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver.exe while opening chrome browser

非 Y 不嫁゛ 提交于 2020-01-04 06:52:09
问题 I have following environment at my local Chrome 67 Python 3.5.0 Selenium 3.12.0 I have downloaded chromedriver with version 2.39 I have .py file as follows from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Chrome(executable_path="hromedriver.exe") driver.get('http://www.google.com') time.sleep(5) search_box = driver.find_element_by_name('q') search_box.send_keys('Python') search_box.submit() time.sleep(5) driver.quit() I am getting following

How to set up performance logging in SeleniumWebdriver with Chrome

霸气de小男生 提交于 2020-01-04 06:12:11
问题 Background - trying to get ChromeDriver to log so that I can start using Lighthouse. I'm trying to get a C# Selenium.Webdriver equivalent of this DesiredCapabilities cap = DesiredCapabilities.chrome(); LoggingPreferences logPrefs = new LoggingPreferences(); logPrefs.enable(LogType.PERFORMANCE, Level.ALL); cap.setCapability(CapabilityType.LOGGING_PREFS, logPrefs); Map<String, Object> perfLogPrefs = new HashMap<String, Object>(); perfLogPrefs.put("traceCategories", "browser,devtools.timeline

How to set up performance logging in SeleniumWebdriver with Chrome

梦想与她 提交于 2020-01-04 06:11:34
问题 Background - trying to get ChromeDriver to log so that I can start using Lighthouse. I'm trying to get a C# Selenium.Webdriver equivalent of this DesiredCapabilities cap = DesiredCapabilities.chrome(); LoggingPreferences logPrefs = new LoggingPreferences(); logPrefs.enable(LogType.PERFORMANCE, Level.ALL); cap.setCapability(CapabilityType.LOGGING_PREFS, logPrefs); Map<String, Object> perfLogPrefs = new HashMap<String, Object>(); perfLogPrefs.put("traceCategories", "browser,devtools.timeline

Run multiple instances of Selenium driver in same machine

大城市里の小女人 提交于 2020-01-04 05:47:04
问题 I am automating a Web app in Chrome using Selenium in C#. I have created separate code bases (exe copies) which would trigger the automation independent of each other, to make this automation faster. Each of the exes launches Chrome and triggers the automation but sometimes I get a Windows pop-up message displaying- 'ChromeDriver.exe has stopped working'. This should not happen as I already have the chromedriver.exe kept under separate code bases which is being triggered by each instances.

How to get password input field ID of gmail wiht selenium Webdriver?

六眼飞鱼酱① 提交于 2020-01-04 05:43:04
问题 The new JS enabled page of http://mail.google.com is making trouble to get ID of password input field. However, I've navigated from email ID page with its ID - identifierID . Help me to get ID of password field. Thanks in advance... 回答1: Please find the updated code: Code: driver.manage().window().maximize(); driver.get("http://www.gmail.c‌​om"); WebElement elementid = driver.findElement(By.id("identifierId")); elementid.sendKeys(""); WebElement elementnxt = driver.findElement(By.id(

Unable to handle Microsoft login authentication popup in headless chrome[Selenium using java]

被刻印的时光 ゝ 提交于 2020-01-04 05:20:14
问题 I am automating the web application to run in Headless Chrome. ChromeDriver Version:- ChromeDriver 74.0.3729.6 Application Login screen has windows popup to enter username and password. I used alerts to handle the popup in normal chrome WebDriverWait wait = new WebDriverWait(driver, 18); wait.until(ExpectedConditions.alertIsPresent()); Alert alert = driver.switchTo().alert(); alert.sendKeys("username" + Keys.TAB + "password"); alert.accept(); When Chrome is set to headless, windows popup is

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 74 though Chrome v74 is installed

五迷三道 提交于 2020-01-04 04:44:05
问题 I am starting to play around with selenium in python, and when i try to run this code it just pops an error that this version of chromedriver only supports version 74 of chrome, but I already downloaded version 74 from here: https://chromedriver.storage.googleapis.com/index.html?path=74.0.3729.6/ The code i am trying to run: import selenium from selenium import webdriver driver = webdriver.Chrome() driver.get('https://stackoverflow.com') driver.quit() The error: Traceback (most recent call

selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited

末鹿安然 提交于 2020-01-03 20:58:10
问题 I am aware of very similar questions having been asked already but even after a few hours of googling, researching and comparing I can't figure out what the problem is. My ultimate goal is to do some web scraping with Python using selenium but for now I can't even get the webdriver to start. This is the code and the error message that I've got so far: $ python Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more