browser

Selenium/PhantomJS raises error

你。 提交于 2020-01-09 19:30:45
问题 I'm trying to run PhantomJS driver in Python but I'm getting error. I've read that I should pass the whole path as an argument but it didn't help. Here is the code: from selenium import webdriver # driver = webdriver.Chrome('D:\Python_projects\chromedriver_win32/chromedriver.exe') # this works driver = webdriver.PhantomJS(executable_path='D:\Python\phantomjs-2.0.0-windows\bin\phantomjs.exe') ERROR: Traceback (most recent call last): File "path to script", line 8, in <module> driver =

Preventing web browser from closing until AJAX response is returned [duplicate]

做~自己de王妃 提交于 2020-01-09 19:14:39
问题 This question already has answers here : JavaScript, browsers, window close - send an AJAX request or run a script on window closing (9 answers) Closed 2 years ago . I've got a game that runs in the web browser (as a plugin) and what I'm trying to do is: Detect if the user has decided to close the browser (Alt+F4, hitting the 'X' button etc) Prevent the browser from closing whilst we fire a call to our web services to log that the user has closed the browser Once we receive the response from

Preventing web browser from closing until AJAX response is returned [duplicate]

痞子三分冷 提交于 2020-01-09 19:13:11
问题 This question already has answers here : JavaScript, browsers, window close - send an AJAX request or run a script on window closing (9 answers) Closed 2 years ago . I've got a game that runs in the web browser (as a plugin) and what I'm trying to do is: Detect if the user has decided to close the browser (Alt+F4, hitting the 'X' button etc) Prevent the browser from closing whilst we fire a call to our web services to log that the user has closed the browser Once we receive the response from

How should i properly invoke a WebBrowser using multiplethreads?

限于喜欢 提交于 2020-01-09 11:46:53
问题 Problem Scope: I'm writing an aplication to save the HTML's retrieved from the Bing and Google searches. I know there are classes to execute the Web Requests using stream such as this example, but since Google and Bing both use Javascript and Ajax to render the results into the HTML, there's no way i can simply read the stream and use get to the result i need. The solution to this, is to use the WebBrowser class and navigate to the url i want, so that the Browser itself will handle all the

Embed browser in Java based desktop application [duplicate]

ぐ巨炮叔叔 提交于 2020-01-09 10:27:26
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Is there a way to embed a browser in Java? How can I embed a browser in a Java based desktop application? Can I communicate with the embedded browser directly (not via localhost)... such as loading html text, capturing onclick events, getting form values? Thanks 回答1: check out Eclipse, it has an embedded browser which is configurable by the user (they support multiple browsers). you can probably embed their

@angular/platform-browser vs. @angular/platform-browser-dynamic

吃可爱长大的小学妹 提交于 2020-01-09 08:40:27
问题 In the newer examples (seeds, angular.io,..) there is an another import for the bootstrapping process: @angular/platform-browser-dynamic . Could someone explain, what are the differences between it and @angular/platform-browser ? There is no information on the official angular.io website yet. 回答1: If you look closely at the history of the angular2 then you will find there are two version 1) beta version 2) release candidate version. At present it is r.c 3 (release candidate 3). Release

Cross-browser techniques for disabling password caching

五迷三道 提交于 2020-01-09 07:16:25
问题 Saving and auto-filing of username/password is a feature of most modern browsers. And the user can generally choose to disable this feature on a per domain basis. But is there a standard way for the site itself to prevent password caching? The emphasis here is cross-browser, so I would employ multiple parallel mechanisms if necessary. (I have seen caching be effectively disabled in the presence of non-standard login fields, eg, an extra hidden password field. But I'd rather not depend on side

Why HTML1113: Document mode restart from IE9 Standards to Quirks

戏子无情 提交于 2020-01-09 07:13:50
问题 I open a webpage in IE9 - and all of a sudden the document mode switches to Quirks mode. The page itself is dead simple - no doctype, no meta tag, just a piece of (test purpose) javascript inside the xslt forming the page. See http://home.arcor.de/martin.honnen/xslt/test2012041901.xml using the mentioned xsl on the same location. For convenience I copied the contents below. Page content is <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="test2012041901.xsl"?>

c# WebRequest using WebBrowser cookie

陌路散爱 提交于 2020-01-09 05:08:05
问题 I am logging into a site using a WebBrowser, then i want use regex to get some data , but webRequest didnt use web Browse cookie , my webBrowser is in public , is there any way to using WebBrowser cookie in webRequest ? 回答1: public CookieContainer GetCookieContainer() { CookieContainer container = new CookieContainer(); foreach (string cookie in webBrowser1.Document.Cookie.Split(';')) { string name = cookie.Split('=')[0]; string value = cookie.Substring(name.Length + 1); string path = "/";

How to develop plugins for the native Android browser

社会主义新天地 提交于 2020-01-09 03:22:07
问题 I searched the web but no luck: how can plugins for the native Android browser be developed?! Neither Google nor the Android SDK give information about this topic. 回答1: I found a sample of a plugin in the Android source code under development/samples/BrowserPlugin . So I guess development/samples/BrowserPlugin/README should be a good start. 来源: https://stackoverflow.com/questions/3960050/how-to-develop-plugins-for-the-native-android-browser