0
ローカルホストアドレスのみを返します。誰かが私を正しい方向に向けることができるかどうか疑問に思っていましたか?それは以下のコードを返すURLアドレスは次のとおりです。 現在のURL http://localhost:14423/SeleniumのIE WebDriverのgetCurrentUrl()メソッドはlocalhostのみを返します
私が使用しているコードがある......
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
寝てみます。 –
Sanjayありがとう、解決策はこのYouTubeのビデオから見つけることができます。それはIEの設定によって引き起こされました! https://www.youtube.com/watch?v=GxTHU_91Z1Q – Rodger75