它只返回本地主机地址。我想知道是否有人能指出我正确的方向?它返回的URL地址与下面的代码如下: 当前网址http://localhost:14423/
我正在使用的代码是......
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
public class IEBrowserProblem {
public static WebDriver driver;
public static void main(String[] args) {
//Set up Ie driver
System.setProperty("webdriver.ie.driver", "C:\\IeDriverFolder/IEDriverServer_x64_2.53.0/IEDriverServer.exe" );
driver = new InternetExplorerDriver();
driver.get("http://localhost:4295/"); // I only included this in an attempt to overcome the issue
driver.navigate().to("http://www.google.co.uk");
String url4 = driver.getCurrentUrl();
System.out.println("current url " + url4);
driver.close();
}//main
}//class