google-chrome-headless

How does this website detect remote control with selenium and chromedriver?

怎甘沉沦 提交于 2020-07-15 07:57:19
问题 I’m trying to screen scrape my own credit card information from the Discover website using selenium and chromedriver. In response it returns the error: Your account cannot currently be accessed. Outdated browsers can expose your computer to security risks. To get the best experience on Discover.com, you may need to update your browser to the latest version and try again. Interestingly, if I write a script to open a headed browser and type in some random account and password, it works normally

Unable to invoke firefox headless

那年仲夏 提交于 2020-06-25 05:19:29
问题 I would like to know why i'm getting the following error message and how can i fix it: Traceback (most recent call last): File "teste.py", line 30, in <\module> main() File "teste.py", line 24, in main driver = connectFirefox(defineOptions()) File "teste.py", line 18, in connectFirefox driver = webdriver.Firefox(firefox_options=options) File "/usr/lib/python3.6/site-packages/selenium/webdriver/firefox /webdriver.py", line 125, in init if options.binary is not None: AttributeError: 'Options'

How to wait for all images to load from page.evaluate function in puppeteer when the DOM is populated using a client side function

拈花ヽ惹草 提交于 2020-06-25 03:23:08
问题 I am trying to make the code execution wait for all images to load before puppeteer takes a screenshot. My DOM gets populated when initData() function is called, which is defined in the client side js file. Delay or timeout is an option but I am sure there must be a more efficient way of doing it. (async (dataObj) => { const url = dataObj.url; const payload = dataObj.payload; const browser = await puppeteer.launch({ headless: false,devtools:false}); const page = await browser.newPage(); await

Capybara with headless chrome doesn't clear session between test cases which use different subdomains

跟風遠走 提交于 2020-06-16 20:51:52
问题 I switched my rails tests from capybara-webkit to headless chrome. When I run a test which visits not the default Capybara host the first case passes but the second one fails because the user are already logged in when they try to login I use chromedriver v2.45 , selenium-webdriver (3.141.0) and capybara (2.18.0) I have the following setup: require 'selenium-webdriver' Capybara.register_driver :chrome do |app| options = Selenium::WebDriver::Chrome::Options.new( args: %w[headless disable-gpu

Capybara with headless chrome doesn't clear session between test cases which use different subdomains

本小妞迷上赌 提交于 2020-06-16 20:50:08
问题 I switched my rails tests from capybara-webkit to headless chrome. When I run a test which visits not the default Capybara host the first case passes but the second one fails because the user are already logged in when they try to login I use chromedriver v2.45 , selenium-webdriver (3.141.0) and capybara (2.18.0) I have the following setup: require 'selenium-webdriver' Capybara.register_driver :chrome do |app| options = Selenium::WebDriver::Chrome::Options.new( args: %w[headless disable-gpu

Running pypupeteer in FLASK gives ValueError: signal only works in main thread

社会主义新天地 提交于 2020-05-27 04:58:05
问题 I am trying to integrate pyppeteer in a flask app. I have python script that runs pyppeteer and takes a screenshot of a page.This is working file if I run the script individually. The PROBLEM is the same script does not work when i run it in a FLASK APP. I get the following error : loop.run_until_complete(capture(url, 123123)) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/ Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete return future

Selenium: How to use Headless Chrome on AWS?

旧时模样 提交于 2020-05-24 20:33:10
问题 Today I saw the message UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead . I am willing to for for Chrome route. How do I install on AWS and run it on my remote AWS instance? I will be using selenium in Python. 回答1: Create a new EC2 instance. SSH log into the machine. Install python, selenium, chromedriver, chromium, and python packages what you need. sudo apt install chromium-chromedriver Copy your python script to the

exposed function queryseldtcor not working in puppeteer

半腔热情 提交于 2020-05-22 07:39:36
问题 document.querySelectorAll('.summary').innerText; this throws error in below snippet saying "document.querySelector is not a function" in my puppeteer page's exposed fucntion "docTest" i want to pass specific node to each method and get the result insde the evaluate. same with document.getElemenetbyId const puppeteer = require('puppeteer'); //var querySelectorAll = require('query-selector'); let docTest = (document) => { var summary = document.querySelectorAll(.summary).innerText; console.log

Selenium C# Test with Chrome Headless - Chrome File Upload Window not working

早过忘川 提交于 2020-05-17 08:06:22
问题 I have a test which uploads a profile image to the web application. In order to upload the image file, an upload button is clicked which opens a file upload window as shown in the screenshot below. The test then sends keys of the image file path to the file upload window in order to upload the file. When the test is run in chrome headless mode, the file upload window is not found and the send keys step fails. If the test is run in normal mode (without headless option) the test runs fine

selenium to download csv file with headless mode, it is not working

两盒软妹~` 提交于 2020-04-30 04:32:21
问题 I download csv file by using selenium. (URL is like https://hogehoge_YYYYMMDD.csv ) With using --headless option, it's not working. But not adding headless option, it is worked! Any idea? Thanks for your help. selenium (3.10.0) Python (2.7.10) Chrome (66.0.3359.181) I also tried latest Chrome version 67.0.3396.62. But same result happens. options = Options() # if comment out this sentence, I can get csv file. # options.add_argument('--headless') options.add_argument("--user-agent=Mozilla/5.0