Unable to launch IE browser in selenium webdriver

前端 未结 7 1168
再見小時候
再見小時候 2020-12-31 22:08

I have written a sample code to launch IE browser and load google page.

public class Sample {

 public static void main(String[] args) 
  {
             


        
相关标签:
7条回答
  • 2020-12-31 23:12

    try:

    public static void main(String[] args) 
    {
        try
        {
           string path = @"H:\IEDriverServer.exe";
           WebDriver driver = new InternetExplorerDriver(path);
           driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
           driver.manage().window().maximize();
    
           driver.get("http://www.google.com");
        }
        catch(Exception ex)
        {
        }
    }
    
    0 讨论(0)
提交回复
热议问题