SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Implement "Stop following the focus" when Firefox autoscrolls a page #20

Open lukeis opened 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 20

What steps will reproduce the problem?

Sample test File attached. Wile running the program I could see the page 
scroll down while the driver is looking for the webelement. and it invokes 
the mouse over event accidentally.And it reports the the element is not 
found. screen shot of the browser showing the page e is also attached.

What is the expected output? What do you see instead?
The program should not through any exception and should work succesfully.
But it shows the exception.
Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: 
Element is not visible, and so cannot be interacted with
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', 
java.version: '1.6.0_10'
Driver info: driver.version: firefox
    at 
org.openqa.selenium.firefox.Response.ifNecessaryThrow(Response.java:95)
    at 
org.openqa.selenium.firefox.FirefoxDriver.sendMessage(FirefoxDriver.java:29
6)
    at 
org.openqa.selenium.firefox.FirefoxWebElement.sendMessage(FirefoxWebElement
.java:267)
    at 
org.openqa.selenium.firefox.FirefoxWebElement.click(FirefoxWebElement.java:
59)
    at AddThisTest.main(AddThisTest.java:13)

What version of the product are you using? On what operating system?

I am using the the webdriver jar from "webdriver-all-7376.zip" on windows 
XP, Firefoxdriver. More info on stack trace.

Please provide any additional information below.

This work perfectly with the old jar.

Reported by Densildesilva on 2009-12-02 14:32:26


lukeis commented 8 years ago
any updates on this issue?

Reported by Densildesilva on 2010-04-28 11:17:22

lukeis commented 8 years ago

Reported by jari.bakken on 2010-06-17 00:07:26

lukeis commented 8 years ago
I am seeing similar thing where dynamic menu gets open on click causing screen to scroll
and most of the time wrong thing gets clicked and/or event is just lost in screen scrolling.

Reported by gketan on 2010-08-24 21:17:16

lukeis commented 8 years ago
Any update on this scrolling problem. Its difficult to do an action to an element which
has it's origin out of page and has a property "Close on mouse out" enabled. 

Example: a fly menu (like the one XP start menu has).

There should be a way provided to make the scroll bar movement manual.

Thanks..

Reported by piyustar07 on 2010-11-16 18:30:53

lukeis commented 8 years ago
This has been a problem for me in two projects with floating divs, and injecting javascript
is an ugly work-around.

Reported by daniel.brolund on 2010-11-24 10:34:57

lukeis commented 8 years ago

Reported by dharani@google.com on 2011-01-20 19:02:47

lukeis commented 8 years ago
Sounds like this could be fixed by doing a mouseover on the element, then continuing
with the scrolling part, then finally mousing_up on the original element.

Reported by antlong on 2011-01-21 01:03:59

lukeis commented 8 years ago
Is there any update on this issue?

I searched and found that still there is no way we can stop the "Follow the focus"
behavior of scroll.

Please let me know if someone has found a way around this.

Thanks. 

Reported by piyustar07 on 2011-02-21 05:54:04

lukeis commented 8 years ago
We simply have a long form with a save button at the top and bottom. The test for filling
out the form and clicking the top button fails due to this issue. Unfortunately, since
we also have print and email buttons, we track the button clicked (otherwise, a submit()
call would work and we could skip the click()). We just rolled back to the previous
jar. Everything works again.

Reported by ccoakley on 2011-03-10 16:55:32

lukeis commented 8 years ago
1) I have a javascript plugin test and use IE driver ( selenium stand alone 2.4.0 jar)On
click on button, I get a modal iframe. When trying to click on button, it scrolls the
browser and ends up with element not visible error, sounds very similar, but I can
repro only in IE

Reported by deivanai on 2011-09-01 23:35:07

lukeis commented 8 years ago
This is exactly the problem i'm having. 

With floating menus the problem gets worse to make it work i got to scroll all the
way down to the bottom of the page.

Reported by castilho.rs on 2011-10-11 20:28:13

lukeis commented 8 years ago
This problem can be seen if you try to click on the Mail link on left column at yahoo.com
, because of the scrolling yahoo has a message appear on the top of page that covers
the element, so click() doesn't work. Selenium 2.11.0 and FF 7.0.1
=======THIS CODE FAILS TO CLICK ON LINK====================
WebDriver driver = new FirefoxDriver();
driver.get("http://www.yahoo.com");
driver.findElement(By.xpath("//*[@id='pa-u_17986569-bd']/a/span[2]")).click();

Reported by ericktsan on 2011-11-18 06:56:52

lukeis commented 8 years ago
Issue 2875 has been merged into this issue.

Reported by barancev on 2011-11-18 11:52:11

lukeis commented 8 years ago
Issue 1748 has been merged into this issue.

Reported by barancev on 2011-11-21 09:13:31

lukeis commented 8 years ago
I have a similar issue with webdriver api. When I enter text or click any element, everything
above that element disapears, and a lot of white space is left on the bottom of the
page. This happens in the IE driver and Firefox driver (haven't tried other drivers).
I narrowed it down to the css style overflow: hidden on the page. I removed that element
(using firebug) and the issue doesn't happen. Maybe it is similar to other people?
The same issue does NOT happen when I use the selenium api. I have used the 2.0.0 version
and the 2.14.0 version and in between.

Reported by LachelnKind on 2011-12-01 04:20:46

lukeis commented 8 years ago
My team met the same issue. And I found that this issue only happened on firefox for
Windows XP not  Windows 7 (64bit) and Windows server 2003 (32bit),neither IE .I didn't
test on other windows systems.

Reported by MaGonglei on 2011-12-05 03:12:27

lukeis commented 8 years ago
I do not have repro steps I can post yet, but I have seen this since 2.20.0 for a particular
set of pages I have. If I roll back to 2.19, it works fine. Perhaps this will help
give some context.

Reported by binod80 on 2012-06-13 13:05:30

lukeis commented 8 years ago

Reported by barancev on 2012-11-28 14:34:00

lukeis commented 8 years ago
asdasd

Reported by hlmloveaustrialia on 2014-01-16 16:36:37

lukeis commented 8 years ago
is this still an issue?

currently on windows 7, FF 35.0.1 with webdriver 2.44 it still follows the focus, but
places the element on the center of the page before clicking on it.

Attempted to run the following code on yahoo:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

WebDriver driver = new FirefoxDriver();
driver.get("http://www.yahoo.com");
//driver.findElement(By.xpath("//div[@id='default-p_30345789-bd']/ul/li/a/i")).click();
//email
driver.findElement(By.xpath("//div[@id='default-p_30345789-bd']/ul/li[18]/a/span")).click();
//travel

Reported by alejandro.moncayo on 2015-08-30 20:35:25

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:44:23