I know there's an issue with trying to send mouse clicks to an IE
window in the background. It doesn't happen 100% of the time, but the
problem happens at the level of the shared native event code. The
symptom is that the link receive the focus, but does not fully process
the click message. I know of no workarounds or fixes yet. Yes, it
makes the project frustrating to work with, and I'd be happy to accept
any patches fixing it, as long as they don't involve forcing the
browser window into focus.
On May 6, 12:42 pm, Jeff <
predato...@gmail.com> wrote:
> This is related to clicking a link <A> when using
> *InternetExplorerDriver*(with IE8). Particularly when I'm debugging,
> the click() doesn't always
> work!!! In the code below, I set a breakpoint on the first click() and run
> to that point. I get the information about the anchor printed just fine,
> then when I step over the e.click() call, it doesn't do anything:.
>
> driver.get("
https://www.familysearch.org");
> WebElement e;
> e = driver.findElement(By.id("sign-in-link"));
> System.out.println("href: " + e.getAttribute("href"));
> System.out.println("title: " + e.getAttribute("title"));
> System.out.println("text: " + e.getText());
> e.click(); *//Breakpoint HERE then step over*
>
> It doesn't make ANY sense. If I run it without a breakpoint, it seems to
> work. The problem comes when I'm trying to debug other stuff ... if I end
> up having to step through code when a click is involved, it becomes a huge
> annoyance.
>
> I then added a second call to e.click(). If I break on the first click,
> step over the first, then the second call to e.click() WORKS! Why?
>
> Anyone see something similar?
>
> NetBeans 6.9.1 / Java 6 / Win7x64 / Selenium-2.0b3 / Firefox 3.6.17 /
> FirefoxWebDriver
>
> --
> Jeff Vincent
>
predato...@gmail.com
> I ♥ DropBox <
http://db.tt/9O6LfBX> !!