The NoSuchMethodError is thrown when trying to open Selenide

Can someone help me with this issue I'm facing while trying to navigate to the Google page?

String url = "https://www.google.com";
Selenide.open(url);

The specific exception that is being thrown is:

    java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()'
java.lang.NoSuchMethodError: 'java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()'
    at org.openqa.selenium.chrome.ChromeOptions.asMap(ChromeOptions.java:292)
    at org.openqa.selenium.MutableCapabilities.merge(MutableCapabilities.java:73)
    at com.codeborne.selenide.webdriver.MergeableCapabilities.<init>(MergeableCapabilities.java:19)
    at ...

I am using Chrome 86.0.4240.111 (64-bit) and selenide 5.15.1

Answer №1

It seems that there is an incompatibility issue between selenide and test-ng, specifically with the version specified in Gradle.

testCompile group: 'org.testng', name: 'testng', version: '7.3.0'
compile group: 'com.codeborne', name: 'selenide', version: '5.15.1'

By removing test-ng, the problem was successfully resolved.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Behat Mink fails to locate file during upload submission

I'm currently testing image uploads using Selenium/Mink with Behat in a Symfony application running within a Docker container. Instead of using $driver->attachFileToField('#id-of-input', $filePath), I am attaching the file directly to th ...

Using Selenium to identify and recognize different color patterns

Is it feasible to use Selenium (preferably in combination with PHPUnit Selenium) to detect colors on a webpage? I have banners on my site, and some of them do not reload properly. It's strange because I can access their elements, but all I see on the ...

The functionality of Selenium is not supported on Firefox 57 when using php

After installing Selenium Server Standalone 3.9.1, XAMPP 3.2.2, php-webdriver 0.9.1, and Firefox 57, I attempted to execute the example.php file located in the root of the selenium folder. The code snippet is as follows: require_once "phpwebdriver/WebDriv ...

The action cannot be executed with more than one method argument specified

Whenever I try to utilize one of the standard PHPUnit Selenium assertions, the test fails and an error message is displayed: Error: Command cannot have multiple method arguments. The correct usage according to is: void assertElementValueEquals(string $ ...

Launching a new tab in Google Chrome using Selenium for Facebook login with PHP WebDriver

Hey there! I'm diving into the world of Selenium using Facebook's PHP Webdriver and feeling a bit lost. I've been trying to figure out how to open a new tab in Chrome with this technology, but haven't had any luck. Any insights or tips ...

Access the freshly launched URL

I am relatively new to PHP and have a table displayed on my webpage. Each row in the table has an auto-incremented rowid that is not being displayed. When clicking on a row, it opens a new page in the format of www.newpage.com/newpage/rowid. If I inspect ...

Struggling with issues during the testing of your Yii application on Selenium?

I am currently using selenium-server-standalone-2.44.0.jar to conduct tests on my Yii application. When I run it in the console without any parameters: java -jar selenium-server-standalone-2.44.0.jar I encounter a few issues: Firefox hangs.In the c ...

Unable to locate the addEventListener function when utilizing php webdriver and selenium

I have been working with the webdriver for just three weeks now, and I've come across an issue regarding finding addEventListener. My setup includes using the selenium standalone server in combination with a PHP framework developed by Facebook. My g ...