Selenium WebDriver Opens Chrome Browser But Doesn't Open URL | Selenium Forum
Y
youralok Posted on 27/12/2021

Hi

 

Selelnium doesn't navigate or get the URL, but just opens the Chrome Browser and the test is passing in TestNg. Please assist ASAP.

I have checked the browser version which is 95 and accordingly I am using the chromedriver.exe file and using correct path as well.

 

if(browserName.equals("Chrome")) {
System.setProperty("webdriver.chrome.driver", "C:\\.....\\chromedriver.exe");
driver = new ChromeDriver();

}

Here is the pom.xml snippet

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com</groupId>
<artifactId>DataDrivenFramework</artifactId>
<version>0.0.1-SNAPSHOT</version>


<dependencies>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.0.0</version>
</dependency>


<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>4.1.5</version>
</dependency>


</dependencies>

</project>

 

 


A
Ashish Replied on 05/01/2022

Is there any error message which you receive?


Y
youralok Replied on 15/04/2022

It is resolved. Let us close this.