Are there significant risks of using chrome driver [duplicate] - selenium

This question already has an answer here:
Security Considerations - ChromeDriver - Webdriver for Chrome
(1 answer)
Closed 2 years ago.
I need to use chrome driver to automate web navigation using selenium.
However, the work computer that I use did not like it, I had to bypass a couple of security blocks. When I dowloaded chrome driver I tried to run it in the cmd terminal which threw up a link and a recommendation that I should read its contents. the link was the following:
https://chromedriver.chromium.org/security-considerations
The link's web page contained a series of warnings about running chrome driver on a computer that has privileged access to information. My computer happens to have just that.
I need to find a way of automating website navigation with or without chrome driver, what should I do??

This is probably because it can do stuff like access websites that you might not want to access, either because its private data or because its a site that you arent allowed to access by law. Pretty sure that, as long as you dont run scripts from others, and know what you are doing yourself you arent taking a risk. The main problem is, that you might not be able to cancel it anymore if it runs once. If you rather do it in another way, you can use the geckodriver from firefox, i have not had such a warning yet but i assume the risk is the same

Related

Difference between running via Firefox versus Selenium WebDriver (GeckoDriver)

I'm trying to scrape my own banking information by automating the process using Selenium in Ruby.
I'm running into a bizarre situation where performing the exact same sequence in the browser (whether just the normal browser or private/incognito) works fine, but when I try to log in under a Selenium-controlled browser I get back a strange 500 error from the server.
I've noticed the browser console logs also look different in terms of certain logging messages related to cookies, JS errors, libraries being loaded, etc.
I have found an answer on SO mentioning one possible difference in Chrome being a specific "cdc" string that might be detectable, but is there some kind of corresponding difference in Firefox/Geckodriver that could be used to detect the fact that I'm trying to automate the browser?
I'm not really sure where to look, because my understand was that running via Selenium should basically have identical behaviour to running via the browser itself.
Would love some guidance on what mechanisms may be in play to explain the difference in behaviour!

running selenium tests via jmeter on blazemeter remotely

We have a jmeter test that launches selenium scripts using the chrome driver config plugin which runs with the Web Driver Sampler, with which we are uploading our own chrome driver. The driver wont be allowed to work though, we keep getting
java.lang.IllegalStateException: The driver is not executable: /tmp/artifacts/chromedriver
we need a way to chmod +x the driver or something similar. is there a way to do this?
Blazemeter support said
JMeter's Webdriver plugin has been deprecated and is not supported on BlazeMeter
but I don't see anything deprecating the webdriver plugin from jmeter The repo and main website seem updated and active.
https://github.com/undera/jmeter-plugins-webdriver
https://jmeter-plugins.org/wiki/WebDriverSampler/?utm_source=jmeter&utm_medium=helplink&utm_campaign=WebDriverSampler
TL/DR: Can we run a selenium test from within a jmeter test using a <com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler on blazemeter? what are the steps to do so?
I hit this exact issue, this is probably too late for you but I thought it would be useful to answer for someone else in the future.
According to this Blazemeter Post titled:
"Using Selenium with JMeter's WebDriver Sampler"
"To launch the WebDriver test in the cloud with more concurrent users on BlazeMeter, use Firefox, which is the only currently supported browser for use with WebDriver. Create a new test and upload your JMX file to run it."
So in summary, only firefox is supported, not chrome within Blazemeter.
I work on a lot of BlazeMeter's documentation and can verify the previous answer -- the Webdriver plugin for JMeter is no longer supported on BlazeMeter.
That's not to say you can't get it to work -- you might -- but it's not supported (i.e. the support team can't assist with any problems that arise with it).
Some added context: We know folks in the plugin development community, which is how we learned the plugin is "deprecated" in the sense that there's not much in the way of future development for it going forward. You're right though - it's not documented anywhere, unfortunately. I can't speak to why that is on the plugin side, but that's why it is no longer supported on the BlazeMeter side.
The other reason it's no longer supported is that we recently introduced a new feature to replace it, our "GUI Functional Test" feature in BlazeMeter, which lets you run Selenium tests either through our BlazeMeter UI or from your own IDE, then watch a recording of what happened in the browser afterward. We have a set of guides covering the topic, starting here:
https://guide.blazemeter.com/hc/en-us/articles/360000700158
We also introduced a means to run a Selenium test alongside a JMeter test, via what we call our End User Experience Monitoring feature, detailed here:
https://guide.blazemeter.com/hc/en-us/articles/360000262118
(That blog post referenced above is a very old one that unfortunately no longer applies today. I regrettably don't work on the blog side of the house, so I don't have the authority to update that one myself.)
Lastly, please let me know if there's any pain points in our docs that we can fix. I've been putting a lot of work into improving and expanding our existing documentation, so feedback is always welcome.

How to specify Selenium Webdriver to use current browser settings for internet

Using Selenium's WebDriver, with PhantomJSDriver, I am trying to do headless browser testing. It works fine when connected to internet WITHOUT a proxy. But when the connection to internet is via an authenticated proxy, it fails. I want to deploy this program to multiple user sites, which might be connected to internet with or without proxy, and in case of proxy, it might be authenticated or unauthenticated.
Is there a way to tell Selenium Webdriver to use the "current" browser's internet connection settings? Please note I am using phantomjs.
Thanks,
abbas
There is some more simple but very effective solution, that I've used when battling with similar issues an year ago.
Do you have these issues when using other *Drivers? If not - my proposal is to use your implementation of any other *Driver that works fine and after it passes authentication just cast it to PhantomJSDriver. Please note that is just possible workaround if your TestFramework hierarchy is built to support such an action.
In addition you can consider the following - when I used such Polymorphism the difference is speed. For FirefoxDriver and PhantomJSDriver it wasn't such a pain and if you can use it only for authentication it will not slow you down noticeable.
I'm not sure that I can help you with my solution, but it will not hurt to try it.

How to change browser mode on IE with selenium?

I'm trying to run a different browser mode on IE with selenium using c#. Here's some code:
var ieWebDriver = new InternetExplorerDriver(#"PATHTOWEBDRIVER");
ieWebDriver.Keyboard.SendKeys(Keys.F12);
ieWebDriver.Keyboard.SendKeys(Keys.LeftAlt);
ieWebDriver.Keyboard.SendKeys("b");
ieWebDriver.Keyboard.SendKeys(Keys.NumberPad7);
I can open the developer tools (f12) but I'm not able to change the browser mode. Is IE preventing this due security? if so, are there any other ways to render content with a lower IE version?
thanks
No. The IEDriver is going to launch whatever IE is installed on the machine.
Changing the 'browser mode' is not a true representation of that version you are changing it to. IE9 on IE7 Standards Mode is not a true version of IE7.
Thus, you are stuck in a problem. You want to test different versions of IE, how do you do it?
The problem is that Windows let's you only have one IE version on a Windows PC at any one time. Yes, there are hacks and programs around to get multiple versions (IE5 and above) to run on a single machine, but they are hacks. Hacks which are not going to work all that well, and still, even with this, you wouldn't even be able to give the IEDriverServer the flexiblity to do this.
You will have to have seperate Windows machines.
A workaround, which again is a hack, is to set browser emulation mode in the registry, as documented in SO question.
Note that in the above question, the accepted answer is not going to work but the other answer may do. As note the comment on that answer, is by the maintainer of the IEDriver itself, advising strongly against this.
Another workaround, I have not tested, is perhaps use the native C# Keyboard.SendKeys, as documented here in MSDN. Am unsure if it will work (don't think anyone has ever ried it), but it is another option.
Selenium supports cross-browser testing of different versions of the same browser, but it is not achieved by switching the version in the Browser Mode in F12 Tools.
See https://code.google.com/p/selenium/wiki/Grid2
You can set up virtual machines with different versions of IE that work as Selenium nodes and use Selenium Hub to connect to them. Let's say you have a virtual machine with Windows 7 which has IE9 installed. You would start a Selenium node there and specify that it accepts requests for IE9 tests. You would then create InternetExplorerDriver for version 9, connect to the hub and run the test. The hub finds out the node with IE9 and runs the test there.
Related post here:
https://stackoverflow.com/a/8524216/1080590
This is of course different to what you're trying to do on a single machine, but it's more reliable and prevents you from extra management of your local IE instance.

Cross browser UI testing [duplicate]

This question already has answers here:
What's the best way to test cross-browser compatibility?
(4 answers)
Closed 9 years ago.
when we develop any website then it looks good at our end but client may view the page with different browser then he/she face problem. i search for tool or way by which i can view my pages from my local machine using different browser and different version. i found few web site provide this facility and saw they very slow and they are giving image of my page which i do not want rather i want to view my page in browser. so i want a tool which allow me to select browser and version and then show my page in that browser with specific version. i may change version and page should refresh for changing browser or version. i hope there must be many tool available but unfortunately i not getting right single one. can anyone guide me. thanks
Adobe shut down BrowserLab a few weeks ago, but provided some guidance for other services that you can use on this page. There there are the Spoon.net browser sandboxes, but it installs the VM on your computer and I never liked that.
I personally use VMWare virtual machines with olders versions of IE on Windows, and Safari on a Mac VM. A little more effort to set this up, but I find it works best.