phantomjs

exec() and phantomjs issue with absolute paths

ぃ、小莉子 提交于 2019-12-01 02:23:23
问题 I'm using phantomJS for the purposes of programmatically taking screenshots of a webpage. My webserver runs on Linux 64 bit. The Scenario My test.php file exec('./phantomjs --version', $o, $e); print_r($o); echo $e; I open test.php in a browser. The out put I get is: 1.9.1 // version number 0 // exit code This proves that I can run commands through exec() and phantomJS is working perfectly. The Issue Now when I replace the above code with: exec('./phantomjs http://mywebsite.com/test.js', $o,

Why is Capybara discarding my session after one event?

时间秒杀一切 提交于 2019-12-01 02:19:25
Testing a rails application which has before_filter :authenticate_user! for most controllers, I cannot get Capybara to preserve a session. I have Capybara configured using PhantomJS with poltergeist. I use the following helper: require 'spec_helper' include Warden::Test::Helpers module FeatureHelpers def login(user = FactoryGirl.create(:default_user)) login_as user, scope: :user user end end I have the following spec file: require 'spec_helper' include Warden::Test::Helpers feature 'Leads Data Tasks View' do before(:each) do @user = login end after{ Warden.test_reset! } context "clicking a

Opening a new tab in Capybara / Poltergeist

柔情痞子 提交于 2019-12-01 01:57:38
问题 I'm trying to open a link by clicking on it using capybara/poltergeist which opens up in a new tab. I can't seem to get it working. @session.find(<link>).click just seems to stay on the same page, as does click_link "<link>" @session.driver.window_handles Only seems to give me 1 window whatever I'm doing. How do I get that link to open in a new tab? Seems to be a fair amount of confusion as to what works or doesn't a la (With Capybara, how do I switch to the new window for links with "_blank"

Grafana 6.4 正式发布!

只谈情不闲聊 提交于 2019-12-01 01:44:33
原文链接: Grafana 6.4 正式发布! 2019 年 10 月 2 日,也就是国内小伙伴们的放假期间, Grafana 实验室正式发布了 Grafana 6.4 版本。这个版本主要围绕数据模型和指标查询对原有的功能进行增强,同时增加了一些新特性。 1. Grafana 6.4 新特性 Explore : 支持跳转到仪表盘面板 Explore : 改进日志的实时查看功能 Loki : 在仪表盘中将日志显示为注释 Loki : 支持在仪表盘面板中使用 Loki 面板 : 新增日志面板 面板 : Data Link 功能增强 图形 : 借助 [Series Override]( https://grafana.com/docs/features/panels/graph/#series-overrides 将点变成线 仪表盘 : 支持在不同面板间共享查询结果 插件 : grafana-toolkit 发布 Alpha 版 图形渲染 : 弃用 PhantomJS Docker : 基础镜像改为 Alpine LDAP : 新增 LDAP Debug UI 2. 从 Explore 回到仪表盘 为了让使用者能够在 Explore 和仪表盘之间来回快速切换,Grafana 6.4 新增了一个功能,当你从仪表盘的下拉菜单中跳转到 Explore 后,还可以回到先前的仪表盘。

not ok PhantomJS exited unexpectedly

拜拜、爱过 提交于 2019-12-01 01:17:14
问题 $ testem ci not ok 1 PhantomJS - Browser "phantomjs /home/ubuntu/.nvm/v0.10.12/lib/node_modules/testem/assets/phantom.js http://localhost:7357/6092" exited unexpectedly. 1..1 # tests 1 # pass 0 # fail 1 $ phantomjs --version 2014-07-28T00:24:22 [WARNING] Unable to load library icui18n "Cannot load library icui18n: (libicui18n.so.48: cannot open shared object file: No such file or directory)" 2014-07-28T00:24:22 [WARNING] phantomjs: cannot connect to X server What's wrong? testem command works

PhantomJS acts differently than Firefox webdriver

对着背影说爱祢 提交于 2019-12-01 01:12:35
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/flights/listdfc=%s&dtc=C%s&rfc=C%s&rtc=%s&dd=%s&rd=%s&px=1000&ns=0&prc=&rng=0&rbd=0&ct=0&view=list" % (

How to download a file with Python, Selenium and PhantomJS

有些话、适合烂在心里 提交于 2019-12-01 00:43:12
Here is my situation: I have to login to a Website and download a CSV from there, headless from a linux server. The page uses JS and does not work without it. After some research I went with Selenium and PhantomJS. Logging in, setting the parameters for the CSV and finding the download button with Selenium/PhantomJS/Py3 was no problem, actually surprisingly enjoyable. But clicking the download button did not do anything. After some research I found out that PhantomJS does not seem to support download-dialogs and downloads but that it is on the upcoming feature list. So I thought I use a

Scraping webpage with react JS in R

混江龙づ霸主 提交于 2019-12-01 00:08:53
I'm trying to scrape page below : https://metro.zakaz.ua/uk/?promotion=1 This page with react content. I can scrape first page with code: url="https://metro.zakaz.ua/uk/?promotion=1" read_html(url)%>% html_nodes("script")%>% .[[8]] %>% html_text()%>% fromJSON()%>% .$catalog%>%.$items%>% data.frame In result I have all items from first page, but I don't know how to scrape others pages. This js code move to other page if that can help: document.querySelectorAll('.catalog-pagination')[0].children[1].children[0].click() Thanks for any help! You will need 'RSelenum' to perform headless navigation.

Casperjs iterating over a list of links using casper.each

喜你入骨 提交于 2019-12-01 00:04:10
问题 I am trying to use Casperjs to get a list of links from a page, then open each of those links, and add to an array object a particular type of data from those pages. The problem I am having is with the loop that executes over each of the list items. First I get a listOfLinks from the original page. This part works and using length I can check that this list is populated. However, using the loop statement this.each as below, none of the console statements ever show up and casperjs appears to

Karma can't capture PhantomJS

…衆ロ難τιáo~ 提交于 2019-12-01 00:00:03
问题 We've set up a Jenkins CI server running Karma targeting PhantomJS. We're running our tests through Grunt. Jenkins, Grunt, and Phantom are all running correctly, and Karma seems to start up fine, but Karma can't capture Phantom. Our scripts run locally (OSX) just fine. The same error exists running via bash or through Jenkins: Running "karma:jenkins-unit" (karma) task [2013-07-03 11:03:12.168] [WARN] config - urlRoot normalized to "/__karma/" DEBUG [reporter]: Using reporter "dots". DEBUG