phantomjs

Migrate from jsdom to phantomJS ? (basic DOM creation)

左心房为你撑大大i 提交于 2019-12-19 08:52:08
问题 M. Bostock pointed out that nodejs' jsdom have incomplete support for svg, and, critical for me, doesn't support getBBox() . Also, he advised to switch to nodejs' PhantomJS. I checked out but the approach is new to me. My nodejs + jsdom script create a virtual DOM, with which my d3js plays and is as follow : var jsdom = require('jsdom'); jsdom.env( // creates virtual page "<html><body></body></html>", // create my DOM hook, [ 'http://d3js.org/d3.v3.min.js', // add my online dependencies ... '

PhantomJS acts differently than Firefox webdriver

百般思念 提交于 2019-12-19 04:43:12
问题 I'm working on some code in which I use Selenium web driver - Firefox. Most of things seems to work but when I try to change the browser to PhantomJS, It starts to behave differently. The page I'm processing is needed to be scrolled slowly to load more and more results and that's probably the problem. Here is the code which works with Firefox webdriver, but doesn't work with PhantomJS: def get_url(destination,start_date,end_date): #the date is like %Y-%m-%d return "https://www.pelikan.sk/sk

PhantomJS not returning results

孤街浪徒 提交于 2019-12-19 03:53:23
问题 I'm testing out PhantomJS and trying to return all startups listed on angel.co. I decided to go with PhantomJS since I would need to paginate through the front page by clicking "Next" at the bottom. Right now this code does not return any results. I'm completely new to PhantomJS and have read through all the code examples so any guidance would be much appreciated. var page = require('webpage').create(); page.open('https://angel.co/startups', function(status) { if (status !== 'success') {

Handling Redirection w/ PhantomJS + Selenium

拈花ヽ惹草 提交于 2019-12-19 03:37:14
问题 I currently run browser tests via PhantomJS + Selenium in Python. desired_capabilities = dict(DesiredCapabilities.PHANTOMJS) desired_capabilities["phantomjs.page.settings.userAgent"] = ("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36") driver = webdriver.PhantomJS(executable_path="./phantomjs", desired_capabilities=desired_capabilities) driver.get('http://google.com') This works fine, unless the page I'm trying to get

Can't find variable: page in PhantomJS

杀马特。学长 韩版系。学妹 提交于 2019-12-19 02:23:26
问题 I'm beginner in test, both in Unit Test and UI Test I'm trying to create a UI test for my login page using following code: console.log("Teste de Login"); var page = require('webpage').create(); page.open('http://localhost/login', function(status) { console.log("Page loadeed"); if(status === "success") { page.render('example1.png'); } page.evaluate(function() { // $("#numeroUsuario").val("99734167"); document.getElementById('numeroUsuario').value = "99734167"; page.render('exampl2.png'); // $(

Issues running casperjs with phantomjs#2.0.0 on Mac (Yosemite)

拥有回忆 提交于 2019-12-19 01:47:53
问题 I'm trying to run CasperJS having PhantomJS#2.0.0 on a Mac(Yosemite) . When trying to run CasperJS I´m getting the following message: "CasperJS needs PhantomJS v1.x /usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js:91 in __die" How can I make it run? Has anyone got it working? 回答1: Currently there is no newer version than 1.1-beta3 released which contains this check. The simplest fix would be to open the bin/bootstrap.js file and remove these lines or replacing the lines that are

Could not find phantomjs

北城余情 提交于 2019-12-18 18:50:54
问题 Getting the following error when trying to use phantomjs from ruby on Ubuntu: Failure/Error: visit root_path Cliver::Dependency::NotFound: Could not find an executable ["phantomjs"] on your path. # ./spec/features/search_spec.rb:17:in `block (2 levels) in <top (required)>' # ./spec/support/vcr.rb:23:in `block (3 levels) in <top (required)>' # ./spec/support/vcr.rb:23:in `block (2 levels) in <top (required)>' phantomjs was built locally and added to PATH. How do I make ruby find phantomjs? 回答1

Can't get phantomjs to work on aws lambda

£可爱£侵袭症+ 提交于 2019-12-18 17:22:29
问题 I'm trying to execute phantomjs using node-lambda and bits and pieces I found on the web mainly https://github.com/justengland/phantom-lambda-template I had some problems deploying node-lambda with node43 but manually installing the latest source seems to have helped in that regard. but now I'm having trouble running the lambda functions. I get 2016-04-12T16:47:12.133Z 3330adb9-00ce-11e6-9c08-d79a6bc84748 Calling phantom: /var/task/phantomjs [ '/var/task/phantomjs-script.js' ] 2016-04-12T16

Selenium with GhostDriver in Python on Windows

瘦欲@ 提交于 2019-12-18 15:01:12
问题 This is embarrassing to ask because it seems like something with so slim chance of error. I wouldn't think this would be difficult, but I've been plugging away at this for almost 3 hours now and it's giving me a headache. I've read several dozen stackoverflow threads and Google threads. I've installed PhantomJS, added it to my System Variables PATH, and it works properly in the command line. I also installed Selenium earlier with easy_install. The error I get is: __init__ C:\Python27\lib\site

phantomJS - Pass Argument to the JS File

人盡茶涼 提交于 2019-12-18 14:15:27
问题 Right now I'm using the following command to run phantomJS exec('./phantomjs table.js',$op,$er); table.js var page = require('webpage').create(); page.open('table.php', function () { page.render('table.png'); phantom.exit(); }); This serves the purpose. But now I'm required to work with a dynamic variable, namely date . So is it possible to pass a PHP or Javascript variable inside the exec command line so that I can use that variable inside table.js ? Update I tried modifying my code