headless-browser

Script not working in HtmlUnitDriver

有些话、适合烂在心里 提交于 2019-12-11 12:13:38
问题 My purpose to execute headless browsing for test-automation. I am using selenium webdriver with Java. Now, issue is script is working fine in Firefox browser,but not in HtmlUnitDriver. Please guide me where I did mistake. public class Headless { public static void main(String[] args) throws InterruptedException { WebDriver driver = new HtmlUnitDriver(); //WebDriver driver=new FirefoxDriver(); // Navigate to Google driver.get("https://www.google.co.in/?gfe_rd=cr&ei=k36cVsa6OubI8Aec14bICQ&gws

Phantomjs Alternative - RFC6455 WebSocket Standard required

北城以北 提交于 2019-12-11 11:40:25
问题 Unit Testing javascript frontend with phantomjs however the websockets unable to authenticate (401) requests. Did some research found that Phantomjs using older Webkit with older standard. What Alternative headless browser could I use instead of Phantomjs with the latest Websocket Standards? 回答1: http://slimerjs.org/ has the same API and can be run headlessly with xvfb. It runs the gecko engine through your installed firefox. So you will have web socket support. There is also http://triflejs

headless-selenium-for-win using Python

半世苍凉 提交于 2019-12-11 07:51:20
问题 I found a headless IE from this github project headless-selenium-for-win Which has the following files desktop_utils.exe headless_ie_selenium.exe I extracted these files to C:\Selenium\headless-selenium I used Selenium Python library to control IE(GUI) using IEDriverServer.exe which works well but when I use headless_ie_selenium.exe my script just went into endless execution and prints nothing. Here is my Python Code from selenium import webdriver from selenium.webdriver.common.keys import

Getting error running Java Selenium Headless testcase due to CLASSPATH uncertainty

与世无争的帅哥 提交于 2019-12-11 06:46:52
问题 Below is my exported java headless selenium testcase code that runs fine from IDE. package pack; import java.util.regex.Pattern; import java.util.concurrent.TimeUnit; import org.junit.*; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.

Headless browsers and Windows Azure Websites

若如初见. 提交于 2019-12-10 20:57:01
问题 I´m trying to use a headless browser for crawling purposes to add SEO features in a open source project i´m developing. The project sample site is deployed via Azure Websites. I tried several ways to get the task working using different solutions like Selenium .NET (PhantomJSDriver, HTMLUnitDriver, ...) or even standalone PhantomJs .exe file. I´m using a headless browser because the site is based in DurandalJS, so it needs to execute scripts and wait for a condition to be true in order to

NodeJS server can't handle multiple users

好久不见. 提交于 2019-12-10 18:54:40
问题 I have a NodeJS server running on Heroku (free version). The server accepts a HTTP POST from a client (passing a parameter) and does a web request (using the parameter) in a headless browser. The headless browser is called HorsemanJS. "Horseman is a Node.js module that makes using PhantomJS a pleasure. It has a straight-forward chainable API, understandable control-flow, support for multiple tabs, and built-in jQuery." When I send a request (actually for loop of 20 requests) from a client (my

Getting GDK_BACKEND does not match available displays error in debian

♀尐吖头ヾ 提交于 2019-12-10 14:23:38
问题 Actually i am trying to run a headless browser in remote debian server through selenium. I have firefox 46.0.1 installed in the server and i am using selenium 2.53.1 version. Whenever i tried to run a given test i got the following error. org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: Error: GDK_BACKEND does not match available displays I have instantiated firefox driver in my code like this: saDriver =

Headless webkit for .NET

偶尔善良 提交于 2019-12-10 13:44:22
问题 Do any of you know of a headless webkit wrapper for .NET? I've looked at WebKitDotNet but it does not seem to work in headless mode. 回答1: I remember reading this post form Steve Sanderson some time ago - http://blog.stevensanderson.com/2010/03/30/using-htmlunit-on-net-for-headless-browser-automation/ I should add that I've never tried anything mentioned in the post and I'm not sure how it will work with Webkit but thought it might help 回答2: Take a look at Jasmine Headless Webkit: https:/

Headless browser not executing properly

荒凉一梦 提交于 2019-12-08 09:37:03
问题 I use selenium webdriver to automate my test-cases. My objective to execute headless browser using HtmlUnitDriver on a sample selenium script. Please find the script mentioned below: import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui

Handle multiple users requests to multiple remote web forms using PhantomJS

北慕城南 提交于 2019-12-08 06:56:37
问题 I created a ExpressJS application using NightmareJS which has a form and when we fill form and submit, it sends requests to some remote forms and calculate data and return those results. But the problem is it only works when single client submit the form. When multiple clients submit the form at same time it doesn't work. What could be the reason for this and how to solve this? Front end JS script $(document).ready(function () { $("#calculate-form").submit(function (event) { var request; if