Unable to open URL in chrome - jmeter

I am using JMeter 5.3 and installed plugin manager 1.6.
Using plugin manager, I have installed selenium WebDriver.
Then downloaded latest chrome driver for Chrome 87 and gave .exe path in chrome driver config.
When I run this Chrome opens and then closes without opening URL and an error is thrown with Response code:500.
When I tried with latest Firefox driver, same error is thrown.
Not sure what is the issue.
Thanks.

Just don't use beanshell as the language, choose groovy from the "Script Language" drop-down and your code should start working:
Since JMeter 3.1 users are recommended to use Groovy as the scripting language because:
It has better performance comparing to Beanshell
It's more Java-compliant including modern language features (generics, lambdas, etc.) while with Beanshell you're stuck at Java 1.5 level
It provides a lot of enhancements on top of Java SDK so you can do more in less lines of code
More information: Apache Groovy - Why and How You Should Use It

Related

Robot framework - Selenium Lib - Getting embedded browser from Outlook

My solution is using a special way to open a web page: we embedded chrome browser into outlook app.
Now I have to write automation test for it using robotframework.
I tried but selenium cannot detect that browser.
Any ideas are appreciated.
Thanks!
Because Selenium uses the Webdriver to start the browser, automating a browser that is not started using webdriver won't be supported.
Alternatives are to use AutoIT library, that automates your keyboard and mouse actions and focuses on windows. ImageHorizon Library and Sikuli Library use image pattern recognition and support both Windows and Linux.
If your target OS is Windows 10, then Microsoft WinAppDriver maybe of interest. This follows a similar approach as AutoIT, but from Microsoft. Does require the Python Appium application to be installed as well.
All approaches have the pro's and con's and in my view beyond the scope of this question.

"Bundle" selenium application with browser?

Basically I'm going to distribute my Selenium program to a number of clients for automation purposes.
Rather than asking every customer to have FireFox installed (and risking possibly incompatible versions) I would prefer if I could have FireFox (or whatever browser) packaged in my program directory (perhaps a portable version).
All my customers will be using Windows btw.
Anyone tried this or have any suggestions to how this could be accomplished?
EDIT: I suppose I could use PhantomJS with selenium and just package my software with the phantomjs driver. That would not require any external browsers to work, would it?
You have also HTMLUnit headless browser option. Please note that it has own proprietary JavaScript rendering engine so need ensure that your test also will work with the "regular" browsers.
Another option is to use Selenoid and Docker for Windows. Your customers could download easily removable images with browsers (no need to clutter Windows with browser files) and run your test suite in multiple containers in parallel.

Is it possible to automate installion using Ruby or Watir?

Currently we are installing our setup(.exe file) on daily basis for testing purpose.I want to automate my installation using Ruby or Watir.Is it possible to automate? Please help me how to perform and give your suggestions.
There are many libraries available for Ruby. Watir itself is constrained to the web browser. Although it does have some technology it's built on top of that should allow Windows environment control. Some of the libraries you can try are Win32-autogui, RAutomation, and windows-pr to name a few.
If you are installing for testing purposes, you can use autoit. It will run your installer, and you can handle some unexpected (though anticipated) errors. I wouldn't use autoit for testing, just for setting up to test.

Is it possible to use Ruby (not jRuby) frontend of the Selenium 2 (WebDriver) with HtmlUnit backend?

I want to use WebDriver on a server-side, without any browser or gui. It is possible with HtmlUnitDriver in a Java bindigns for WebDriver. But I like ruby more than java. Can I solve my problem with ruby bindings or I must use java bindings?
Since HtmlUnit is a Java library, you need Java at some point in your stack. If you want the tests to run on MRI, this can be done with the the Selenium Remote server (and the selenium-webdriver gem).
Instructions are here on the Selenium wiki.

Are there any good scriptable webpage rendering engines besides Selenium RC?

I like using Selenium RC for automating interaction with webpages that require JavaScript, except for the fact that it goes through launching an full instance of Firefox to run a script. Questions:
Is there a way to run Selenium RC so that it launches a headless version of Firefox that doesn't create a window? I'm using OS X. I know there is a way to do this using Xvfb on a Linux server, but I'm wondering how this would be done on OS X.
Is there any lighter weight alternative to Selenium RC? The tool would have to execute any JavaScript on a webpage and alter the DOM accordingly. I'm not too familiar with Spidermonkey; but can it be used for this purpose? Thanks.
There's a well supported Java one called HtmlUnit, which is completely headless - there is no GUI. It runs Javascript.
If you don't want to directly call Java, you can in theory run Selenium with HtmlUnit as its backend headlessly - I haven't got it to work yet though.
Also, you might find Selenium 2 better than Selenium RC. It has the WebDriver built in, and looks like it is going to be better and more complete.
Finally, you could run Selenium remotely on your own separate Linux server, and call it from the Mac remotely. Or you can use a service like Sauce Labs.

Resources