selenium-chromedriver

Create a Python executable with chromedriver & Selenium

若如初见. 提交于 2019-12-05 06:22:02
问题 I have created a small web scraping app using Selenium & chromedriver for a project that outputs the content into an excel file. The people I did this app for unfortunately aren't the most tech-savvy. So my question is how can I share this app with these people? I looked into py2exe.org, but it doesn't take the chromedriver into account when creating the executable. Any better ways of doing this, without these people having to add the files manually to their "usr/bin"? 回答1: You can do this

How do I use Selenium Webdriver on headless Chrome?

跟風遠走 提交于 2019-12-05 06:19:50
I'm learning to use Selenium for basic things like taking a screenshot, scraping, and testing and would like to use it with headless Chrome, which is now stable as of Chrome 59. I have been able to take a screenshot using the 'selenium-webdriver' gem and chromedriver, but not headless. Here is the ruby script that I am running which hangs after starting to initialize the driver require 'rubygems' require 'selenium-webdriver' Selenium::WebDriver.logger.level = :debug p 'initializing driver' driver = Selenium::WebDriver.for :chrome, switches: %w[--headless --disable-gpu --screenshot --hide

Protractor webdriver-manager chromedriver update

给你一囗甜甜゛ 提交于 2019-12-05 05:36:38
There seems to be a issue with chromedriver 2.2 and the newest version of Chrome. This issue has to deal with the protractor not being able to send tab keys with 2.2. If I do webdriver-manager update, it does not update to the chromedriver 2.4. I did a hack where I downloaded chromedriver 2.4 exe myself and manually put it in the selenium folder, but that is not the best way to do this. How do you update protractor to use the latest version of Chromedriver 2.4? I am having the same issue as you. It is related to a new release of chrome 54. You need to wait for the next release of webdriver

Embedding Selenium ChromeDriver in Windows Form

两盒软妹~` 提交于 2019-12-05 05:22:42
I'd like to embed the Selenium ChromeDriver within a Windows Form panel. I've successfully followed this example for embedding notepad in a Windows Form. I think the problem where I am having trouble is getting the MainWindowHandle from the ChromeDriver . Here's what I've got so far: (pastebin link of full code: https://pastebin.com/RNv2vbJ1 ) //----------------------TEST--------------------- ChromeDriverService service = ChromeDriverService.CreateDefaultService(); service.HideCommandPromptWindow = true; ChromeDriver driver = new ChromeDriver(service); Console.WriteLine(driver

Selenium/Chrome/ChromeDriver Issue Preventing Crawl on VPS (DevToolsActivePort file doesn't exist)

 ̄綄美尐妖づ 提交于 2019-12-05 05:16:05
问题 I purchased a VPS — my first ever — which is running CentOS 7 64-bit. I had absolutely zero experience with CentOS 7 until I began using this VPS today, so please go easy on me. When trying to scrape some dynamically generated content with Scrapy and Selenium, the script ultimately fails and the log throws an error that reads: DevToolsActivePort file doesn't exist On the very next line in the log, it pulls up info about the Chrome WebDriver: (Driver info: chromedriver=2.40.565383 ... Hence I

driver.Manage().Logs.GetLog(LogType.Browser) no longer working in Chromedriver version 75.0.3770

♀尐吖头ヾ 提交于 2019-12-05 03:46:15
I am working on a Selenium framework using C# .net and Selenium Webdriver (with Chromedriver). I recently updated to the latest version of Chromedriver 75.0.3770.8 and now one of my lines of code is no longer working: driver.Manage().Logs.GetLog(LogType.Browser) My ChromeOptions are set as follows: options.SetLoggingPreference(LogType.Browser, LogLevel.Severe); None of this has changed - the only update I've made is to Chromedriver 75. If I revert back to Chromedriver 74 then this code works again. Currently it is failing with "object reference not set to an instance of an object". The release

Selenium on MAC, Message: 'chromedriver' executable may have wrong permissions

强颜欢笑 提交于 2019-12-05 02:59:20
问题 I'm just trying to do something very basic on my Mac using selenium and I can't even open a webpage. I'm getting an error of : Traceback (most recent call last): File "/Users/godsinred/Desktop/InstagramLiker/GmailAccountGenerator.py", line 10, in <module> driver = webdriver.Chrome() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__ self.service.start() File "/Library/Frameworks/Python.framework

Unable to shake off hardcoded delay from my script

≯℡__Kan透↙ 提交于 2019-12-05 02:38:10
问题 I've written a script in vba in combination with selenium to parse all the company names available in a webpage. The webpage has got lazyloading method active so there are only 20 links become visible in each scroll. If I scroll 2 times then the number of links visible are 40 and so on. There are 1000 links available in that webpage. My below script can reach the bottom of that page handling all the scroll and fetch all the names available in that webpage. However, it is necessary to wait a

How to resolve “chromedriver executable needs to be in PATH” error when running Selenium Chrome using virtualenv within PyDev?

梦想的初衷 提交于 2019-12-05 01:46:19
Short: Having read Controlling the Browser with the selenium Module at https://automatetheboringstuff.com/chapter11 , I am trying to run the Selenium Chrome driver in a virtual environment from PyDev. I have managed to do it from outside PyDev, but from within, I get: selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Long: I'm using Linux Debian 3.10.11-1. Following https://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/ , before even starting with PyDev, I . . . Set up a virtual environment with virtualenv Installed

How do you write end-to-end tests for Polymer (JS) based application (circa May 2015)?

萝らか妹 提交于 2019-12-04 23:54:45
问题 I have built a Polymer based application. I'd like to write some end-to-end tests (not unit tests, but user behavior integration tests) for it. How do I do this currently (May 2015)? 回答1: I spent the past few days looking into this problem. Despite the vast number of pages devoted to one related topic or another on the web, nothing documents a solution to this problem. I was able to piece together something that works. So here it is. Hope this is useful for those looking to write end-to-end