Setting proxy in RSelenium with Chrome Web Driver - r

I've done a lot of searches. But I haven't found how to set chrome web driver to use proxy yet.
I've found people using phantomjs:
Setting proxy in RSelenium with PhantomJS
and people using Firefox:
Using Rselenium with firefox and socks5h
But I've found no one using chrome yet. And strangely, there is a makeFirefoxProfile() but no makeChromeProfile function. So doing it this way is not applicable.
Back to the question. Is there a way to set proxy for chrome in Selenium? Thanks!

Related

Yii2: Why is bootstrap.css loaded multiple times in Firefox?

When I call the pages of my Yii 2 web application in Firefox bootstrap.css and bootstrap.css.map gets loaded six times with each request. In Chrome and Opera this doesn't happen.
On Fedora 20 with Firefox 33.1 and Yii 2.0.1. Server is on the same machine: Apache 2.4.10 with PHP 5.5.18.
What could be the reason? I have also Phusion_Passenger 4.0.42 installed. Could this cause the problem (but only with Firefox?)?
This seems to has something to do with the web development tools of Firefox. With Firebug the file is loaded only once, like it should be, but only as long as the Network monitor (or is it called Network analysis in English? In German it is Netzwerkanalyse) of Firefox is not opened at the same time! As soon as the network monitor is opened too, Firebug shows the reloading of the same file as well.
I don't know if it is a bug or if it is a (required) side effect.
I've found this behavior with different Firefox instances (not only one like I've stated in the question comments first).

SCORM (flash Player Content) not working on Windows Server 2012 R2 which has IE11 integrated installed on it

I have website which contains SCORM package, installed on Windows Server 2012 R2 which has IE11 installed on it. Flash Player is also embedded with IE.
IE Version: 11.0.9600.17278.
Updated Version: 11.0.12 (KB2977629)
When I launch SCORM (flash Player Content) from my application, it is not working. It just displays a blank page however the Title of IE is set to the text from the SCORM content.
However if I access the same URL from any other machine which has previous version of Windows OS (i.e. previous to Windows 8 OS), it is working as expected on IE9, IE10 and IE11.
While trying to find out the cause, I came across some forum which says we have to install the “Desktop Experience” on the server to enable the inbuilt flash player. After doing that also, My SCORM contents are not getting displayed.
To find out more details, I have uploaded the SCORM Package on SCORM Cloud to check if it is working there. Here again the same problem, it doesn’t work and displays error message saying that “Member is not found” and when I tried to find out the location of the error then it is coming at windows.document.myflash.SetVariable(…) method on the Windows Server 2012 R2 with IE11.
When I performed “Addwatch”, it is saying that windows.document.myflash doesn’t have SetVariable(…) method.
However if access the same cloud URL from other machine (Having OS previous to Windows 8 OS), it is working as expected.
Any help would be appreciated.
Thanks.
Windows Server has probably a restricted Internet Explorer installed (this is an addon for IE that restricts the kind of content that can be run from a web page).
If this is disabling flash content, you will have to uninstall the addon.
You could check if any other flash based page is working, e.g. Youtube to confirm that Flash is disabled.
I found the cause and the solution for the same.
Actually it was throwing an javascript error which was expecting "StudentName" and "StudentID" property which I haven't set. However even though I was not setting these parameter, it was working on other versions of IE.
After setting these parameters, it is working now.
Thanks for all suggestions.

Launching Internet Explorer 9 with Developer Tools

I have a script that runs in a browser add-on. It's using the log function of the console object that is only available when the F12 Developer Tools is loaded.
While I can disable the add-on and enable it again to see the early messages intended to be logged, I find it a bit annoying. Is there a way to load IE9 with developer tools? I'm hoping there might be an obscure argument to be passed to the application to enable that.
If this were possible, I would assume it would be mapped to a command-line options, however there doesn't appear to be any such option (though it would be a nice addition to the browser). A current list of all command line options can be found online at Windows Internet Explorer Command-Line Options.
With IE10, if you leave the Developer tool pinned to the browser window, it will be loaded the next time you open Internet Explorer after you exit.
Note that this will not work if it is unpinned.

CSS Works In IE8 With Linux/Apache2.0/PHP4 But Not With Windows/IIS7/PHP5

I just changed from a linux/apache2.0/php4 web server to a windows/iis7/php5 web server (I only post php versions since that was a significant change).
My css is working just fine on the linux one (http://66.119.8.165/flcunderconstruction.php) but it isn't working on the windows one (http://66.119.8.236/flcunderconstruction.php).
Now, the issue only seems to be applicable to internet explorer 8 (maybe older, but I'm not testing those). Firefox and internet explorer 9 work just fine.
I think I've ruled out php issues as I created a non-php version (http://66.119.8.236/flcunderconstruction.html) and the issue persists.
I'm assuming the problem is in the css (which is quite large and throws up a lot of validation errors). But since it only occurs on the windows server and with ie8, I'm hesitant to start whacking away at the code.
Any ideas?
JJ
The broken version stops loading when it hits /include/html5.js. You only see this on IE8 because later versions handle the HTML5 stuff just fine without the polyfill.
Missing: http://66.119.8.236/include/html5.js
Present: http://66.119.8.165/include/html5.js
To test this, press F12 to open up the Developer Tools. Switch your Browser Mode to IE8. Jump over to your Network tab and press "Start Capturing". Perform a hard refresh (CTRL+F5), and watch as the files begin loading in. You'll note the 404 when it gets to the HTML5 polyfill. (Image below)
Using Fiddler2, I set up and Auto Responder to automatically add the HTML5 file from my local machine in the place of your missing file. Refreshing the request resulted in the entire site loading as expected in IE8. Put your polyfill on the other server, and you should be set.

Is it possible to run browsers in headless mode in a windows box?

I'm writing tests using webdriver in Java.
Is there a way to run browsers (ff / ie) in headless mode in a windows box?
I cant use a linux box and HtmlUnitDriver is not helping as our webapp has many ajax controls.
I have started a small project to supply a driver for WebDriver using SimpleBrowser. You may want to check it out: https://github.com/Teun/SimpleBrowser.WebDriver
It's still early days though. I would appreciate help in the form of contributions and testing.
At this point there is no headless version that I am aware of the Firefox or IE. Since Firefox is open source it's possible that you could get the source code for that browser and then remove the UI portion but there are a few problems with it that I can see. First you have to build a custom app to setup your own load testing engine. Second you are locked to one web render, though I think chrome is open source as well but it doesn't play as nicely as Firefox or IE (using the system .dlls vs. a custom executable). Third without a lot of testing I am sure there will be stability issues and potentially other unforseen issues with this option. That being said there is a .net headless browser that's fairly simple and would probably be decent for load testing called simple browser. However it depends on what you are wanting to load. If you just looking for bandwidth and server load then you should be find using multiple instances of the browser. I would be curious to know if using the headless browser in this fashion if you instantiated different WebDriver if it would play nicely. i.e.
WebDriver driver1 = new SimpleBrowser();
WebDriver driver2 = new SimpleBrowser();
.
.
.
.
.
WebDriver driver[n] = new SimpleBrowser();
and then you could run [n] parallel tests. Also of note in the above code SimpleBrowser() doesn't hook directly to the WebDriver interface you would have to Extend the interface to reference that .dll
Start the test program as a Windows service and the browsers will run just fine, even on a machine with no monitors. Technically speaking, they're running in a "session" that is disconnected, but it's essentially what you mean by "headless".
HtmlUnitDriver does support ajax, and can run in both java and c# (if ported via IKVM).
There is, however, no way to run IE and FF in headless mode. I can't tell you how many times I've wished for that...

Resources