java-client's NewSessionPayload.class conflict with selenium's NewSessionPayload.class
See original GitHub issueOS: Windows 10 Selenium Version: 3.9.1 Browser: Firefox Browser Version: 59.0.2 (64-bit)
Expected Behavior
- When start Firefox driver will call class NewSessionPageload.java of selenium instead call NewSessionPageload.java of java-client.
Actual Behavior
- When start Firefox driver called class NewSessionPageload.java of java-client instead call NewSessionPageload.java of selenium.
- Error message. Exception in thread “main” org.openqa.selenium.InvalidArgumentException: firefox_profile is not the name of a known capability or extension capability
Steps to reproduce
- Please run source code to reproduce :
public class FirefoxTest {
public static void main(String[] args) {
// declaration and instantiation of objects/variables
System.setProperty("webdriver.gecko.driver", "/path/to/geckodriver_win64.exe");
FirefoxProfile ffprofile = new FirefoxProfile();
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setProfile(ffprofile);
WebDriver driver = new FirefoxDriver(firefoxOptions);
String baseUrl = "http://demo.guru99.com/test/newtours/";
String expectedTitle = "Welcome: Mercury Tours";
String actualTitle = "";
driver.get(baseUrl);
// get the actual value of the title
actualTitle = driver.getTitle();
/*
* compare the actual title of the page with the expected one and print
* the result as "Passed" or "Failed"
*/
if (actualTitle.contentEquals(expectedTitle)){
System.out.println("Test Passed!");
} else {
System.out.println("Test Failed");
}
//close Fire fox
driver.close();
}
}
------------------------------------------pom.xml file------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>DemoFirefoxDriver</groupId>
<artifactId>DemoFirefoxDriver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<selenium.webdriver.version>3.9.1</selenium.webdriver.version>
</properties>
<build>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>6.0.0-BETA3</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>${selenium.webdriver.version}</version>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.webdriver.version}</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
</exclusion>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-firefox-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.webdriver.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-ie-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>${selenium.webdriver.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${selenium.webdriver.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-edge-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-edge-driver</artifactId>
<version>${selenium.webdriver.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-safari-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-safari-driver</artifactId>
<version>${selenium.webdriver.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.0-jre</version>
</dependency>
</dependencies>
</project>
- This is a bug of java-client?
- Do Anyone have the workaround for this issue? Please advice me. Thank in advance!
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
org.openqa.selenium.WebDriverException: Error forwarding ...
This error message... Exception in thread "main" org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find ...
Read more >Error forwarding the new session Error forwarding the request ...
We are running selenium tests against Chrome 46 on Selenium grid and we got the below error frequently: Exception in thread "main" org.openqa.selenium....
Read more >WebDriver - W3C
WebDriver is a remote control interface that enables introspection and control of user agents. It provides a platform- and language-neutral ...
Read more >All Classes - Selenium
Takes a capability and allows it to be transformed into 0, 1, or n different capabilities for a W3C New Session payload. CapabilityType....
Read more >org.openqa.selenium.SessionNotCreatedException
openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes. I could reproduce this error. It seems something was broken because we did not test it on desktop browser.
The fix was merged. It is going to be published soon.