phantomjs

Automating bugzilla metrics query

旧时模样 提交于 2019-12-25 16:41:37
问题 I have been using bugzillametrics to generate metrics from Bugzilla. I really love the product. One of the things that I am trying to do is to automate the query process, meaning, instead of opening up a browser and running the query link everyday, i want to run it using a cronjob. In talking with the developer of bugzillametrics, looks like there is a client side javascript that runs to generate the snapshot from the query. To automate the process, I am using phantomjs. However, with my

“undefined is not a function” on page login under Selenium (Java) using PhantomJS

早过忘川 提交于 2019-12-25 13:09:19
问题 I'm trying to set up a crawler, using Selenium under Java. When I use ChromeDriver it works fine. However, I get into a whole new bunch of problems if I try to use a headless browser like PhantomJS. this is where problems happen: Capabilities caps = new DesiredCapabilities(); ((DesiredCapabilities) caps).setJavascriptEnabled(true); ((DesiredCapabilities) caps).setCapability("takesScreenshot", false); ((DesiredCapabilities) caps).setCapability("locationContextEnabled", true); (

Why am I not receiving phantomjs page response?

为君一笑 提交于 2019-12-25 10:51:09
问题 I'm trying to access some QUnit test urls using phantomjs (version 1.9.1, on Windows). I'm behind a proxy at a corporate site but the URLs I'm trying to access are being served from my local development workstation, plus I've even tried accessing the same URLs with two other browsers (Hv3 and Dooble) without the necessary proxy settings, and they get an HTML response, even if they can't execute the QUnit javascript. So I've even tried adjusting the javascriptEnabled setting (plus another

reactjs - phantomjs-node issues with “fs” module

拥有回忆 提交于 2019-12-25 09:34:41
问题 I am trying to use phantomjs-node to capture screen. In my component i import const phantom = require('phantom'); . Then after click i want to run method - printOnePage(){ phantom.create().then(function(ph) { ph.createPage().then(function(page) { page.open('https://stackoverflow.com/').then(function(status) { console.log(status); page.property('content').then(function(content) { console.log(content); page.close(); ph.exit(); }); }); }); }); } But i am still gettint error - webpack:///./~

PhantomJS get no real content running on AWS EC2 CentOS 6

折月煮酒 提交于 2019-12-25 09:30:14
问题 I successfully ran the PhantomJS+Selenium in Python 3.5 in my laptop, but when I used it on AWS EC2 CentOS 6 environment, I did not get error but got the content showing: <html><head><meta content="no-cache" http-equiv="Pragma"> <meta content="-1" http-equiv="Expires"> <meta content="no-cache" http-equiv="CacheControl"> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <link href="data:;base64,iVBORw0KGgo=" rel="shortcut

How to stop loading page in Selenium WebDriver when an element is already present?

那年仲夏 提交于 2019-12-25 08:57:12
问题 I'm scraping a website, which for some reason takes 15 seconds to load, but the elements I need get loaded in the first 5 seconds. The question is, can I stop loading a page, and move on with the code when the code is already present? Current code: driver.Navigate().GoToUrl(url); new WebDriverWait(driver, TimeSpan.FromSeconds(20)) .Until(ExpectedConditions.ElementIsVisible(By.XPath(xpath))); Current behaviour: I call driver.Navigate().GoToUrl(url); The driver starts loading the page The

Is it possible to invoke PhantomJS through the browser?

倖福魔咒の 提交于 2019-12-25 08:37:14
问题 I'm trying to generate server-side images of a portion of my DOM, and then serve those images up to users from my server once they're created. I'm curious as to the implementation possibilities of PhantomJS, as I don't entirely understand its purpose beyond exploring and testing. I get that it is a self-contained binary, and I've got it running basic apps like in their tutorials. But is there a way to do something along the lines of the following? <html> <body> <h1>This is a test.</h1>

disabling Cookies on phantomjs using selenium with python [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-25 06:15:06
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . I have searched for long time but I could not find how to disable cookies for phantomjs using selenium with python . I couldn't understand the documentation of phantomjs.Please someone help me. 回答1: Documentation suggests this driver.cookies_enabled = False , you can use it. 来源: https:/

disabling Cookies on phantomjs using selenium with python [closed]

和自甴很熟 提交于 2019-12-25 06:14:30
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . I have searched for long time but I could not find how to disable cookies for phantomjs using selenium with python . I couldn't understand the documentation of phantomjs.Please someone help me. 回答1: Documentation suggests this driver.cookies_enabled = False , you can use it. 来源: https:/

Using multiple page.open in one script

强颜欢笑 提交于 2019-12-25 06:12:28
问题 My goal is open many pages(with a short delay) and save my data to a file. But my code does not work. var gamesList = [url1,url2,url3]; //gamesList is getting from a file var urls = []; var useragent = []; useragent.push('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14'); useragent.push('Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50'); var page = require('webpage').create(); page.settings.userAgent = useragent[Math.floor(Math.random() * useragent.length)];