Closed lukeis closed 8 years ago
Reported by jmleyba
on 2011-12-18 01:14:03
The project has an extensive set of tests that are consistently run against IE9, so
saying that WebDriver does not work with IE9 in a global sense is inaccurate. The log
you posted in the issue report does not appear to include a call to the get() method
(or its equivalent in whatever language binding you use). Can you please provide the
test code you are using along with the URL you are trying to navigate to?
Reported by james.h.evans.jr
on 2011-12-19 10:10:25
NeedsClarification
@Parameters({ "browser" })
@BeforeClass
(groups = "part1" )
public void setup(String browser) throws Exception {
// You may use any WebDriver implementation.
//TODO IE /Chrome don't work properly
if (browser.equals("iexplore"))
{
driver = new InternetExplorerDriver();
Reporter.log("Internet Explorer browser started.");
}
if (browser.equals("chrome"))
{
driver = new ChromeDriver();
driver.get("http://lab.xxxxxx.com");
Reporter.log("Chrome browser started.");
}
if (browser.equals("firefox"))
{
driver = new FirefoxDriver();
Reporter.log("Firefox browser started.");
}
if (browser.equals(""))
{
Reporter.log("No browser specified in testng.xml.");
}
// A "base url", used by selenium to resolve relative URLs
String baseUrl = "http://lab.xxxxx.com";
// Create the Selenium implementation
selenium = new WebDriverBackedSelenium(driver, baseUrl);
//this is how to start it with Selenium RC server
//selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla
Firefox\\firefox.exe", "http://lab.xxxxx.com");
//selenium = new DefaultSelenium("localhost", 4444, "*iexplore C:\\Program Files
(x86)\\Internet Explorer\\iexplore.exe", "http://lab.xxxxx.com");
//selenium.start();
selenium.addLocationStrategy("jquery",
"var loc = locator; " +
"var attr = null; " +
"var isattr = false; " +
"var inx = locator.lastIndexOf('@'); " +
"if (inx != -1){ " +
" loc = locator.substring(0, inx); " +
" attr = locator.substring(inx + 1); " +
" isattr = true; " +
"} " +
"var found = jQuery(inDocument).find(loc); " +
"if (found.length >= 1) { " +
" if (isattr) { " +
" return found[0].getAttribute(attr); " +
" } else { " +
" return found[0]; " +
" } " +
"} else { " +
" return null; " +
"}"
);
selenium.windowMaximize();
selenium.windowFocus();
}
@DataProvider(name = "DP_LOGIN_EMP")
public Object[][] createData_LOGIN_EMP() throws Exception{
Object[][] retObjArr=getTableArray(ExcelFilePath,
"Login", "loginEmp");
return(retObjArr);
}
@Test (dataProvider = "DP_LOGIN_EMP", groups = "part1")
public void LoginEmployer(String dd_username, String dd_password, String dd_usertype,
String dd_firstname, String dd_fullname) throws InterruptedException
{
String s;
Reporter.log(Utils.testStart("LoginEmployer"));
selenium.open("/SignIn/LogOn");
Reporter.log("Username/Password: '" + dd_username + " / " + dd_password + "'");
Thread.sleep(3000);
selenium.click("jquery=#UserName");
selenium.type("jquery=#UserName", dd_username);
selenium.type("Password", dd_password);
Reported by ygrunin
on 2011-12-20 06:55:17
I tried running example from "The Book of Geb" , which navigates to google and searches
for wikipedia. following is the code
import geb.*
import org.openqa.selenium.*
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.ie.InternetExplorerDriver
import spock.lang.*
Browser.drive{
autoclearcookies=false
new InternetExplorerDriver()
go "http://www.google.com"
$("input",name: "q").value("wikipedia")
$("input",name:"btng").click()
waitFor{title.endswith("Google Search") }
def firstLink=$("li.g",0).find("a.1")
assert firstLink.text()=="wikipedia"
firstLink.click()
waitFor{title=="wikipedia" }
}
one of the issues i faced initially was the program didn't open internet explorer then
i found out protected mode needs to be disabled. after i disabled it i ran the program
again which opened IE however it just says "This is the initial start page for the
WebDriver server." and tries navigating to http://localhost:48031/ [note every time
the port number changes]
other weirder thing is after it opens internet explorer it also opens Firefox and executes
rest of program [note :i dont call firefoxdriver]
attaching error log
Reported by srdvchandran
on 2012-02-28 05:59:04
I am having the exact same issue as well. First started with the Protected mode -> I
fixed that. Then I run into IE9 always opening the localhost page. I installed Selenium
2.2 and also Selenium Server. I am using Eclipse.
Reported by artez.hermez
on 2012-03-23 16:08:15
Hi,
Firstly i want to mention that it's ok that localhost:PORTNUMBER page is opened. That
is how webdriver works.
1) @ygru...
Sorry, but i'm not able to reproduce your issue.
At log from initial post i don't even see a try to open any URL. More information is
required.
MInimized from your code test is attached and it doesn't produce any errors on selenium
2.25.
Could you update selenium and reproduce issue or provide more information?
2) @srdvchan...
As i can see from attached log your test failed at "waitFor{title.endswith("Google
Search")}" line
due 5 seconds timeout. Could you encrease timeout or use another not so complex as
Google page as example?
I have no experience with geb so i cannot help with your test code. Also i don;t know
is it true or not but maybe firefox is started because of:
import org.openqa.selenium.firefox.FirefoxDriver
?
3) @artez.he...
If you still have some problem please update selenium up to last version - it's 2.25
now.
If problem is still unresolved then please provide example URL or HTML code of your
page,
your test script and adittional details like version of IE etc.
It'd be fine if you'll report it in another issue.
Reported by a.u.savchuk
on 2012-07-21 07:28:08
Closing the issue due to inactivity. If it is still actual please ask to reopen.
Reported by barancev
on 2012-12-11 23:28:27
Invalid
Reported by luke.semerau
on 2015-09-17 18:14:23
Originally reported on Google Code with ID 3062
Reported by
ygrunin
on 2011-12-14 08:21:02