Selenium: Can't SendKeys() to an item that was below the visible window but was made visible by Click() -


i have problem text field visible @ time of sendkeys. i'm using iedriverserver.exe , c#.

here's how can reproduce problem:

the text field in question visible in window have scroll down see it. scroll down click on element using code this:

var element = driver.findelement(by.xpath("…")); element.click(); 

this scrolls window down , makes text field visible.

but when try send text now-visible window:

element.sendkeys("blah"); 

i exception:

when_applicant_enters_application.should_be_instantly_approved_on_external threw exception: openqa.selenium.elementnotvisibleexception: element not displayed

how can fix or workaround problem?

selenium version: 2.32.1 os: windows 7 browser: ie browser version: 9.0.15

i've written code demonstrating problem , submitted selenium tech support volunteers.

the full discussion @ http://code.google.com/p/selenium/issues/detail?id=5620 take-home is:

// doesn't work // driver = new internetexplorerdriver(); // driver.navigate().gotourl(@"d:\cgy\selenium\bug5620\bug5620\bug5620.htm");  // works // driver = new firefoxdriver(); // driver.navigate().gotourl(@"d:\cgy\selenium\bug5620\bug5620\bug5620.htm");  // works driver = new internetexplorerdriver(); driver.navigate().gotourl(@"http://localhost:8080/bug5620/"); // hosted on tomcat 

so there may problem possibly involves ie, ie security settings, visual studio local servers and/or ie driver. may not code problem, needs documented, since other people apparently running problem.

i don't know problem have work-around @ point, use firefox driver.

thanks help, jim. if find out better way of dealing problem, please add answer here other folks.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -