0

Iam working on a sample testing project on ebay website on the sell module. Iam getting this error : Driver info: driver.version: unknown . I have added all the dependency which are mandatory. This code worked in the morning itself. Now its showing error. I cant able to solve this. Pleasehelp me to solve.

This is my Test code

package Testcases.Pac;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

import Pageobjects.Pac.Ebay_Sell_POM;
import io.github.bonigarcia.wdm.WebDriverManager;

public class Ebay_Sell {

    public static void main(String[] args) throws InterruptedException {
        
    
        WebDriverManager.chromedriver().setup();
        WebDriver driver = new ChromeDriver();
        driver.get("https://www.ebay.com/");
        
        Ebay_Sell_POM obj = new Ebay_Sell_POM(driver);
        

        obj.Click_sell_link();
    
        obj.Click_listItem();
    
        obj.Enter_searchBar();
        obj.Select_suggestion_list();

        obj.Click_searchIcon();
    }

}

And my POM code is

package Pageobjects.Pac;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;

public class Ebay_Sell_POM {
    
    WebDriver driver;
    By sell_link = By.linkText("Sell");
    By linkItem = By.linkText("List an item");
    By searchBar = By.id("s0-1-0-22-6-@keyword-@box-@input-textbox");
    By searchIcon = By.className("keyword-suggestion__button btn btn--primary");

    public Ebay_Sell_POM(WebDriver driver) {
        this.driver = driver;
    }
    public void Click_sell_link() {
        driver.findElement(sell_link).click();  
    }

    public void Click_listItem() {
        driver.findElement(linkItem).click();   
    }
    public void Enter_searchBar() {
        driver.findElement(searchBar).sendKeys("mob");
    }
    public void Select_suggestion_list() throws InterruptedException {
        Thread.sleep(2000);
        driver.findElement(searchBar).sendKeys(Keys.ARROW_DOWN);
    }
    public void Click_searchIcon() {
        driver.findElement(searchIcon).click(); 
    }
        

}

My error Screenshot

This code worked 30 minutes ago itself

Samuel
  • 1
  • The version is not the problem, the error is a bit above (compound class name not permitted). Check this one: https://stackoverflow.com/questions/32043877/compound-class-names-not-permitted-error-webdriver – Andreas Dolk Sep 09 '22 at 15:40

0 Answers0