headless-browser

Headless_ie_driver Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.')

我怕爱的太早我们不能终老 提交于 2019-11-28 12:03:05
问题 I'm trying to run a simple headless web-browser; from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Ie("headless_ie_selenium.exe") driver.get("www.google.com") print(driver.title) And I'm getting: selenium.common.exceptions.SessionNotCreatedException: Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 ('There are no more files.') for URL 'http://localhost:65393/' What I've tried but didn't work: 1: from

Prevent CSS/other resource download in PhantomJS/Selenium driven by Python

懵懂的女人 提交于 2019-11-28 06:31:45
I'm trying to speed up Selenium/PhantomJS webscraper in Python by preventing download of CSS/other resources. All I need to download is img src and alt tags. I've found this code: page.onResourceRequested = function(requestData, request) { if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') { console.log('The url of the request is matching. Aborting: ' + requestData['url']); request.abort(); } }; via: How can I control PhantomJS to skip download some kind of resource? How/where can I implement this code in Selenium driven by Python? Or, is there

Headless browser detection

混江龙づ霸主 提交于 2019-11-28 06:08:27
问题 Do you know any webapps/online tests/online firewalls that are trying to detect if user is using selenium/puppeteer/phantomJS or any other headless browser? I've created my puppeteer online crawler. I've changed many different stuff like window.navigator object (user-agent, ~.webdriver etc.). Now I want to make sure that it is undetectable. 回答1: There is a headless browser detection test which tests for the following: Does the User-Agent contain the string "HeadlessChrome"? Is navigator

Which drivers support “no-browser”/“headless” testing?

自闭症网瘾萝莉.ら 提交于 2019-11-27 16:25:21
Actually I want to run my selenium code on server where dont want open the any browser. But I am confused which webdriver is use for the server which do all task (where I download some files from some site and store in my server). To execute your Test Suite through Selenium without opening any browser you can use any of the Browser Client from the following list : Headless Chrome : Here you can find an working example . Headless Firefox : Here you can find an working example . PhantomJS : Here you can find an working example . HtmlUnitDriver : Here you can find an working example . headless

Headless browser with full javascript support for java

◇◆丶佛笑我妖孽 提交于 2019-11-27 13:31:12
I have been using HtmlUnit (the developers did a great job) as an headless browser for some of my previous applications but the javascript support isn't working for some website that my next application will be accessing. I heard about QtWebKit binding for Python but my application will be in Java or is there a Java binding for WebKit or QtWebKit? Does anyone know a good headless browser for Java with full javascript support? Haroldo_OK Nathan Ridley's answer to another similar question is the most complete one I've found so far. Anyway, if everything fails, you could use a Python or JS

Headless, scriptable Firefox/Webkit on linux? [closed]

旧城冷巷雨未停 提交于 2019-11-27 10:36:49
I'm looking to automate some web interactions, namely periodic download of files from a secure website. This basically involves entering my username/password and navigating to the appropriate URL. I tried simple scripting in Python, followed by more sophisticated scripting, only to discover this particular website is using some obnoxious javascript and flash based mechanism for login, rendering my methods useless. I then tried HTMLUnit, but that doesn't seem to want to work either. I suspect use of Flash is the issue. I don't really want to think about it any more, so I'm leaning towards

How to extract a JSON object that was defined in a HTML page javascript block using Python?

旧街凉风 提交于 2019-11-27 08:05:19
I am downloading HTML pages that have data defined in them in the following way: ... <script type= "text/javascript"> window.blog.data = {"activity":{"type":"read"}}; </script> ... I would like to extract the JSON object defined in 'window.blog.data'. Is there a simpler way than parsing it manually? (I am looking into Beautiful Soap but can't seem to find a method that will return the exact object without parsing) Thanks Edit: Would it be possible and more correct to do this with a python headless browser (e.g., Ghost.py)? jfs BeautifulSoup is an html parser; you also need a javascript parser

How to use Selenium with PHP?

大憨熊 提交于 2019-11-27 07:41:10
I'd like to use Selenium to automate a few web tasks (not for testing). I think I have Selenium RC Server installed, but have no way of writing "test scripts" since I can't find a client driver in PHP (see: http://seleniumhq.org/download/ ). Is there a way for me to use Selenium with PHP? This seems to suggest I need PHPUnit http://www.phpunit.de/manual/current/en/selenium.html . I just want to automate a few tasks, not get involved with a full suite of testing. Try Following things Get Phpunit installed and working Also have JAVA sdk & jre on your pc. Now record test cases using selenium IDE.

PHP Headless Browser? [closed]

旧街凉风 提交于 2019-11-27 04:38:01
Is there a headless browser library for PHP? Would like something that has a JS engine built into it. FOSS preferred. Anthony Hatzopoulos PhantomJS - http://phantomjs.org/ PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. You can couple it with something like php-PhantomjsRunner (now deprecated) if you want or bake your own . When setup and ready to start testing with PhantomJS, pick out one of the various Testing Frameworks at your disposal. I recently also came across this tutorial

How to use Selenium with PHP?

孤者浪人 提交于 2019-11-27 03:59:41
问题 I'd like to use Selenium to automate a few web tasks (not for testing). I think I have Selenium RC Server installed, but have no way of writing "test scripts" since I can't find a client driver in PHP (see: http://seleniumhq.org/download/). Is there a way for me to use Selenium with PHP? This seems to suggest I need PHPUnit http://www.phpunit.de/manual/current/en/selenium.html. I just want to automate a few tasks, not get involved with a full suite of testing. 回答1: Try Following things Get