phantomjs

Cucumber/Capybara: tests fail randomly under PhantomJS

烂漫一生 提交于 2020-01-04 09:56:50
问题 When I run cucumber scenarios under PhantomJS I get Capybara::ElementNotFound: Unable to find css ".given_class" exceptions in random places it looks like driver does not wait for element appearance I'm using: Ruby 2.0 Cucumber 1.3.6 Capybara 2.1.0 Selenium-webdriver 2.35.1 PhantomJS 1.9.1 回答1: Capybara, particularly with PhantomJS will load a page really quickly, and perform checks for elements. As such, some elements may not have loaded and tests fail. By default capybara has a wait time of

Cucumber/Capybara: tests fail randomly under PhantomJS

爷,独闯天下 提交于 2020-01-04 09:56:02
问题 When I run cucumber scenarios under PhantomJS I get Capybara::ElementNotFound: Unable to find css ".given_class" exceptions in random places it looks like driver does not wait for element appearance I'm using: Ruby 2.0 Cucumber 1.3.6 Capybara 2.1.0 Selenium-webdriver 2.35.1 PhantomJS 1.9.1 回答1: Capybara, particularly with PhantomJS will load a page really quickly, and perform checks for elements. As such, some elements may not have loaded and tests fail. By default capybara has a wait time of

access the 'd' element from an SVG object with casperjs

核能气质少年 提交于 2020-01-04 09:14:07
问题 I am a very beginer in javascript/phantomjs/casperjs (like only several days of learning) but I am stuck with this svg graph I am trying to scrap data from. I am trying to access the d="M20,331.37,331.37,21.40...." element from an SVG object using a casperjs code, and write in the console and a txt file (or CSV). I try the following code: var casper = require('casper').create({ pageSettings: { loadImages: true, loadPlugins: true, userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit

How to configure Angular2 Quickstart to run phantomjs?

偶尔善良 提交于 2020-01-04 06:08:29
问题 I am trying to figure out how to run the tests of Angular2 Quickstart with phantomjs. I thought these steps were enough to configure Karma: 1. Clone the repository $ git clone https://github.com/angular/quickstart.git $ cd quickstart 2. Install phantomjs and phantomjs launcher $ npm install --save-dev phantomjs $ npm install --save-dev karma-phantomjs-launcher 3. Change karma.conf.js // First change require('karma-chrome-launcher') => require('karma-phantomjs-launcher') // Second change

Where does Chutzpah Test Adapter install PhantomJS?

与世无争的帅哥 提交于 2020-01-04 02:57:13
问题 I've just installed the Chutzpah Test Adapter extension to a VS2013, and run a simple Jasmine test through VS's Test Explorer. That worked fine - running the tests headless. Then I tried to run the same test through Resharper's test explorer, and and that didn't work. It opened up a browser window, and then nothing happened. I've generally preferred Resharper's test explorer, but I'm the only one on the team who's using Resharper, despite my constant nagging, which is why I'm looking at

Open graph issue with AngularJS + Phantom

若如初见. 提交于 2020-01-04 02:31:47
问题 I am running a setup of AngularJS AJAX application, and using PhantomJS and the Angular-seo library in order to serve the crawlers with actual mark up instead of JS code. Unfortunately I am getting an error that says: The privacy settings for this attachment prevent you from posting it to this Timeline. This seems to be an issue that concerns many users, bu has received no attention whatsoever at the developers community. My of meta tags, which I must mention that are all filled with the

How to get response status 404 in casper.js within thenOpen instead of undefined?

我与影子孤独终老i 提交于 2020-01-03 15:55:27
问题 Any idea why code below doesn't catch 404 in either response var or in the http.status.404 event? I run this with phantomjs 1.9, casperjs 1.0.2 and Windows 7 var casper = require("casper").create(), utils = require('utils'); casper.start(); casper.thenOpen('http://www.google.com/sadfafsdgfsd', function(response) { casper.capture('test.png'); utils.dump(response); }); casper.on('http.status.404', function(resource) { this.echo('wait, this url is 404: ' + resource.url); }); casper.run(function(

Angular js 1.6.9 tests Unknown provider: $$taskTrackerFactoryProvider

筅森魡賤 提交于 2020-01-03 07:31:08
问题 My project is forced to be in 1.6.9 due to regression risks (for example, lowercase is obsolete in 1.7). But recently, I made a npm update and all my karma/phantomjs tests are failing, giving PhantomJS 2.1.1 (Windows 7.0.0) Error: [$injector:unpr] Unknown provider: $$taskTrackerFactoryProvider <- $$taskTrackerFactory <- $browser <- $rootScope <- $browser http://errors.angularjs.org/1.6.9$injector/unpr?p0=%24%24taskTrackerFactoryProvider%20%3C-%20%24%24taskTrackerFactory%20%3C-%20%24browser%20

PhantomJS file upload fails if file is larger than 20000 bytes

帅比萌擦擦* 提交于 2020-01-03 05:33:34
问题 I have discovered a really strange problem when using PhantomJS with Selenium to upload a file. I noticed, that smaller files can be uploaded, while larger files can not. So I ran a binary search to find out at which filesize it stops working. This revealed that every file bigger than exactly 20000 bytes fails to upload. Since it's not a power of two I guess this limit was set by someone, for some reason, within the whole stack of phantomJS, Ghostdriver or Selenium. I have spend hours pinning

Make phantomjs run all '*.js' files in the current directory

二次信任 提交于 2020-01-02 09:59:22
问题 I want to write a script to call phantomjs on a bunch of test scripts in a directory. This script runs the first test and then exits. #!/bin/bash find . -maxdepth 1 -name '*.js' -type f -exec phantomjs {} + Executing a similar command with echo , like find . -maxdepth 1 -name '*.js' -type f -exec echo {} + prints (as expected) all the filenames in the directory. How can I make phantomjs run all .js files in the current directory? Is this a bash problem or a phantomjs problem? 回答1: AFAIK