phantomjs

Error message when using PhantomJS, breaks at random intervals

时光总嘲笑我的痴心妄想 提交于 2019-12-23 04:39:51
问题 The error message that I keep getting is the following: assert.js:92 throw new assert.AssertionError({ ^ AssertionError: abnormal phantomjs exit code: -1073741819 at Console.assert (console.js:102:23) at ChildProcess.<anonymous> (C:\Users\file_path...\node_modules\phantom\phantom.js:132:28) at ChildProcess.emit (events.js:98:17) at Process.ChildProcess._handle.onexit (child_process.js:810:12) Program node app.js exited with code 8 The break happens at random, sometimes after inserting over a

How to call a button's onClick() method in PhantomJS?

浪尽此生 提交于 2019-12-23 04:18:05
问题 This is NOT a duplicate. I have looked at the answers in PhantomJS; click an element and the OP said that the answer was to call the "onClick()" method assigned to element that needs to be clicked, but the OP does NOT say HOW they accomplished this. Also there are no accepted answers. I am trying to automate the submission of Android apps to Amazon's App store with a PhantonJS script. I have these steps so far: Open the developer console URL: https://developer.amazon.com/login.html Login to

Switch frames with selenium and phantomJS

前提是你 提交于 2019-12-23 04:09:16
问题 I need to open the search windows on this page. https://permits.losgatosca.gov/CitizenAccess/default.aspx With firefox is working just fine, but when I try to do the same with phantomJS i got an error. This is the code I'm using to open the search BUTTON_id = 'ctl00_PlaceHolderMain_TabDataList_TabsDataList_ctl01_LinksDataList_ctl00_LinkItemUrl' #'//*[@id="ctl00_PlaceHolderMain_TabDataList_TabsDataList_ctl01_LinksDataList_ctl00_LinkItemUrl"]/span' driver_1.switch_to_frame("ACAFrame") button =

Running ghostdriver using java gives error

笑着哭i 提交于 2019-12-23 04:06:33
问题 I am using remote ubuntu machine to run my test cases. I have jenkins configured with github. I can access this machine using putty.exe using my windows7 machine. I want to use phantomjs to run headless test cases (schedule jobs)i.e. when my windows machine is off the tests will run on remote ubuntu machine which is always on. Now the problem is , when I am build now it gives error : Caused by org.openqa.selenium.HasInputDevices ... ... My setup() method and pom looks like : setup()

PhantomJS Proxy when using Remote Webdriver?

若如初见. 提交于 2019-12-23 03:35:29
问题 I am trying to use selenium in python with PhantomJS. I am running a selenium hub server so am using webdriver.Remote to start a webdriver. The normal way to pass a proxy to PhantomJS is: service_args = [ '--proxy=127.0.0.1:9999', '--proxy-type=socks5', ] browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args) This won't workthough for webdriver.Remote(service_args=service_args) As webdriver.Remote takes only desired_capabilities, not service args, as a parameter. Is

国内加速下载镜像地址

☆樱花仙子☆ 提交于 2019-12-22 22:39:42
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 国内直接从官网下载比较困难,需要一些技术手段。这里提供一个国内的镜像下载地址列表,方便网友下载。 Zabbix Yarn Selenium Redis RabbitMQ Python Phantomjs Phantomjs POI Openresty Openjdk Nodejs Nginx MySQL Memcached Leveldown Keepalived Helm HAProxy Grafana Git for MacOS GeckoDriver Filebeat Etcd Electron ChromeDriver Bazel Ansible Tortoisegit Logstash Kibana Elasticsearch Git for Windows 来源: oschina 链接: https://my.oschina.net/newbe36524/blog/3146008

How use --config with CasperJS

被刻印的时光 ゝ 提交于 2019-12-22 18:39:12
问题 I've read the Casper documentation and they say that ALL PhantonJS cli options is available on CasperJS but I am trying to use --config=/path/to/config.json and is not working. Is there a way to fix this or do something similar since I don't want to be editing the configs on terminal. casperjs --config=config.json test.js My config.json file: { "load-images" : false } My test.js file: var casper = require('casper').create(); casper.start('http://www.example.com/', function(){ this.capture(

phantomjs

泪湿孤枕 提交于 2019-12-22 17:25:43
var args = require('system').args; var fs = require('fs'); // 设置编码utf8 phantom.outputEncoding = 'utf8'; // 初始化 var page = new WebPage(); // 设置userAgent page.settings.userAgent = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'; // 设置不加载图片 page.settings.loadImages = false; if (1 == args.length) { console.log('Url address is required'); phantom.exit(); } var urlAddress = args[1].toLowerCase(); console.log(urlAddress); // 不加载css page.onResourceRequested = function (requestData, request) { // if (mapDict.hasOwnProperty(requestData['url'])) { //

Casperjs and Failed to save screenshot with captureSelector

随声附和 提交于 2019-12-22 13:49:42
问题 I have such code : casper.thenOpen(url, function() { this.echo('Opening at ' + width); //give some time for the page to load casper.waitFor(function check() { return this.evaluate(function() { return document.querySelectorAll('#browse-packshots').length > 0; }); }, function then() { //set the viewport to the desired height and width this.viewport(width, height); //Set up two vars, one for the fullpage save, one for the actual viewport save var FPfilename = saveDir + '/fullpage-' + width + "

JavaFX apllication does not run with Selenium WebDriver

好久不见. 提交于 2019-12-22 13:06:10
问题 I want to use Selenium WebDriver in JavaFX application that I want to get a screenshot of a webpage and show it in ImageView in JavaFX app. This code works completely fine to take screenshot of webpage and save it: package application; import java.io.File; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.phantomjs.PhantomJSDriver; public class Main{ public