I'm using selenium 4 devtools in my tests. Recently, my local browser got updated to v105. However, doesn't seem like mvn repository has artifacts to support it. The latest version is available v104 https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-devtools-v104. With that, is there any work around I can utilize until v105 becomes available
Thank you!
Download 4.5.0 Selenium Verison. Need not to add selenium devtools dependency seperately. It has CDP support for v104, v105, and v106 also.
https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG
Related
I tried to use replit online platform for web scraping using selenium in Edge browser. replit automatically install selenium 4.1.3 but I couldn't find msedge-selenium-tools to support this version.
How can I install selenium (3.141) to support msedge-selenium-tools?
Any help will be highly appreciated.
Thank You
Bibek
I don't know much about this online IDE, but I did some testing and found that it seems to be able to control the version of the referenced package via a configuration in the pyproject.toml file.
First, uninstall selenium 4.1.3 in installed Packages. When installing edge-selenium-tools package, you will find that it bundles selenium 3.141 installed with edge-selenium-tools. Second, add this line in pyproject.toml file.
selenium = "^3.141.0"
Something like this:
In addition, for more questions related to IDE replit, I suggest you post your questions in its community, I think there may be someone with more relevant experience who can answer your questions.
I am working with JMeter and Selenium. Installed the plugins manager and via that, installed web-driver sampler. When I look into lib folder, I found the selenium jars version are 2.52.0 which is much older. I can able to work with that without any issues. But the real problem is:
Using Maven, I updated all the selenium jars to 3.9.1 version and its dependant jars like guava, gson, commons, etc.
Now, when I open the jmx files with WebDriver sampler and driver configs, I receive below error.
Using maven, I mean, I downloaded all the jars from maven repo manually and pasted into JMeter lib folder.
Please help me to work with latest Selenium drivers in JMeter.
You won't be able to use WebDriver Sampler plugin with Selenium 3.9.1 as it explicitly relies on SessionNotFoundException class which has been removed in the latest Selenium libraries.
So the options are in:
Use WebDriver Sampler with browser version(s) supported by Selenium 2.52.0
Reach out to WebDriver Sampler plugin developers and/or maintainers at jmeter-plugins forum to check whether it is planned to update Selenium libraries and if yes - when. You can also update WebDriver Sampler source code by yourself and send pull request to the plugin maintainer.
Switch to JSR223 Sampler and Groovy language instead. Apart from being able to use latest libraries you will have full control of the WebDriver instance using DesiredCapabilities at full instead of limited subset exposed via *Driver Config elements.
I have a strange problem, which I'm unable to solve for sometime. I have a selenium WDS for Firefox browser. I tried to execute the code in JMeter UI, everything works fine. But when I try to execute the same in a server (using XVFB driver), I get the error:
rm="sun.org.mozilla.javascript.EvaluatorException: Can't find method org.openqa.selenium.remote.RemoteWebDriver.executeScript(string,org.openqa.selenium.remote.RemoteWebElement). (<Unknown source>#17) in <Unknown source> at line number 17"
All the required drivers are the same as the one I locally try. Yet, I get the error only when I run in the server but not locally. Please help
Most probably you have different versions of either WebDriver Sampler or dependency libraries, I don't see any other ways for the same script to work on one machine and don't work on another.
Install the same version of JMeter onto both machines (use JMeter 3.2 or later, whatever is available at JMeter Downloads Page)
Install latest version of the WebDriver Sampler plugin using JMeter Plugins Manager
Your test should now be running fine.
I am successfully using the Conductor framework to scrape data off a website. I use the Chrome browser and therefore I have installed chromedriver.exe in the root of my project.
To speed things up I want to replace Chrome with the headless PhantomJS browser. I installed PhantomJS as explained in the answer to this Stackoverflow question: PhantomJS & Conductor Framework and have changed the browser to Browser.PHANTOMJS in #Config.
Whatever I do however, I get no results.
I found no documentation how to setup PhantomJS for use with Selenium or PhantomJS.
The question How to Implement Selenium WebDriver with PhantomJS and Can we Use Sikuli with PhantomJS? did not help either.
How to replace Chrome with PhantomJS for use with Selenium and Conductor?
The trouble you are having appears to be due to an older version of the PhantomJS library included in Conductor. The error when running PhantomJS can be found in this imported issue on the Selenium Github. The remedy is to import a fork of PhantomJS which works with the newer releases of Selenium.
You can easily implement this by editing the pom.xml file and swapping
<groupId>com.github.detro</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>${phantomjs_version}</version>
with
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
You can use a headless chrome driver with selenium, as showed here:
https://duo.com/decipher/driving-headless-chrome-with-python
I have installed the selenium ide 2.5.0 add-on for firefox and after exporting the test case as Java/JUnit 4/ Web Driver. When I try to execute it with JUnit testing I always get exceptions when some class from selenium is not found. I have used selenium-api-4.2.0.jar and selenium-server-stendalone-2.42.2.jar. Than I have also tried switching from selenium-api-4.2.0.jar to selenium-api-2.42.2.jar but there always a class missing.
Which is the correct selenium-api and selenium-server-stendalone Jar to use for the 2.5.0 IDE?
Thnx in advace
This graphic in the documentation shows you how all the jars relate to each other. The selenium-server-standalone by itself contains all of those and all the dependencies.
Selenium IDE does not export code that uses the Selenium-RC API, it only uses Selenium WebDriver API.
Generally, unless you are doing something very particular, you want to use the latest stable release of everything.
If you still have problems, have a read through this, post your code, post your error messages.