Incorrect value for getTitle and getCurrentUrl | Selenium Forum
M
Posted on 12/07/2016
Hi,
When trying to execute the below code . I am getting output as:

Title is : WebDriver
URL is : http://localhost:28230/


//import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class DriverClass {

public static void main(String[] args){
//FirefoxDriver fd=new FirefoxDriver();
//fd.get("www.gmail.com");

System.setProperty("webdriver.ie.driver", "E:\\Selenium\\IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
driver.get("http://www.gmail.com");
System.out.println(driver.getTitle());
String url=driver.getCurrentUrl();
System.out.println(url);
driver.close();
}
}
Please help me if there is any issue with this code.

Thanks,
Vishnu Sarat.


}

M
Replied on 13/07/2016

must be a bug with IE Driver.


M
Replied on 13/07/2016

Working right for me.

Started InternetExplorerDriver server (64-bit)
2.53.1.0
Listening on port 22595
Only local connections are allowed
Gmail
https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1#identifier

[b:1tp8vdgj]Mine IE version is 11 and seleium is 2.53.1.0[/b:1tp8vdgj]


M
Replied on 13/07/2016

what is the version you're using vishnu?


M
Replied on 16/07/2016

Thanks for your replies.

I am using below versions:
Selenium - 2.53.1
Java - 1.7.0_80
IE -11
IE driver - 64 bit