Using Chrome Driver with Selenium 2

前端 未结 7 1300
情深已故
情深已故 2020-12-28 16:30

I\'m trying to use Chrome Drive to execute some of my tests, which are working perfectly with Firefox, but I\'m not being able to execute them, I\'m already verified the req

相关标签:
7条回答
  • 2020-12-28 17:27

    Use this for Chrome

    Step-1 Download Chrome driver from location

    Step-2 Use Testng Framework

    @BeforeClass
    
    public void setUp() throws Exception
    
    { 
    
        System.setProperty("webdriver.chrome.driver", "D://Work-Selenium//chromedriver_win32//chromedriver.exe");
    
        driver = new ChromeDriver();
    
        baseUrl = "http://google.com";
    
        driver.get(baseUrl);
    
    }
    
    0 讨论(0)
提交回复
热议问题