Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Element not visible issue with latest selenium jar #8431

Open
lukeis opened this issue Mar 4, 2016 · 19 comments
Open

Element not visible issue with latest selenium jar #8431

lukeis opened this issue Mar 4, 2016 · 19 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 8431

I am trying to enter values in the input field, say username.
but it trows exception "Element no visible".


code : 
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOf(element));

note : Element is a webElement.

it loads the page, and waits for 30 sec and then throws exception
element not visible. 


herewith I am attaching the html page and required css file.


Expected output.
filling the text input field

Result:
Exception : element not found.


Selenium version:
OS: Linux
Browser: Firefox 33
Browser version: selenium-2.44.0


please find the attached html and required files.


Thanks & Regards
Manvendra Kumar Mishra

Reported by manvendra.mishra90 on 2015-01-28 10:36:39


- _Attachment: [seltest.zip](https://storage.googleapis.com/google-code-attachments/selenium/issue-8431/comment-0/seltest.zip)_
@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

please consider it under high priority. Thanks 

Reported by manvendra.mishra90 on 2015-01-28 10:38:09

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Please let me know what is the progress .. 
any help will be appreciated. 

Thanks in advance

Reported by manvendra.mishra90 on 2015-02-03 14:52:32

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

any update?

Reported by manvendra.mishra90 on 2015-02-06 08:53:50

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Can you let me know, what is the status?
Is it selenium issue or  i am doing something wrong?
Any help will be appreciated.

Thanks in advance

Reported by manvendra.mishra90 on 2015-02-11 09:38:49

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

This is an atom bug. A simplified reproduction page:

<html><head>
<script src="test_bootstrap.js"></script>
<script>
  goog.require('bot.dom');
  goog.require('webdriver.testing.jsunit');
</script>
<style>
body, html
{
    overflow:auto;
}
.main_content_div
{
    border: solid 1px black;
    position: absolute;
}
</style>
</head>
<body>  
<script>
  function testCanFindDomElementInCurrentDocument() {
    assertTrue(bot.dom.isShown(document.getElementById('main_content_div')));
  }
</script>
<div id="main_content_div" class="main_content_div" style="height:100px;width:100px;">test</div>
</body>
</html>

Firefox fails this test, Chrome and IE pass.

Reported by barancev on 2015-02-14 20:20:58

  • Status changed: Accepted
  • Labels added: Browser-Atoms, Browser-Firefox
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Additional information: getOverflowState returns HIDDEN for the 'main_content_div' element.

Reported by barancev on 2015-02-14 20:52:26

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

is this problem because of new selenium jar ? Because it works well with selenium 2.31-java.jar
and firefox 14. 


Reported by manvendra.mishra90 on 2015-02-16 06:32:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

@barancev Test passes with <!DOCTYPE html>, fails without.

Reported by jmleyba on 2015-02-16 16:38:31

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I see, but the element is obviously visible without <!DOCTYPE html> declaration too.

Reported by barancev on 2015-02-16 16:43:57

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

In Firefox the document element has zero height, which triggers the HIDDEN computation:

    var rect = bot.dom.getClientRect(document.documentElement);
    assertNotEquals('zero height', 0, rect.height);
    assertNotEquals('zero width', 0, rect.width);
    assertTrue(bot.dom.isShown(document.getElementById('main_content_div')));

Reported by jmleyba on 2015-02-16 16:52:05

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Bug is in bot.dom.getClientRect. Testing fix.

Reported by jmleyba on 2015-02-16 17:02:00

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Attached is a patch that fixes this particular issue. It causes some regressions with
scrolling, which I don't have time to investigate right now.

Reported by jmleyba on 2015-02-16 17:52:36


- _Attachment: [patch.diff](https://storage.googleapis.com/google-code-attachments/selenium/issue-8431/comment-13/patch.diff)_

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

while compiling the jar where to keep this dom.js . Can you please let me know folder
structure.

Thanks in advance

Reported by manvendra.mishra90 on 2015-02-17 09:14:13

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Patch was intended to document my progress, not as a drop in replacement. If you want
to use it, you'll have to rebuild from source (see wiki). I wouldn't recommend it due
to the previously mentioned regressions in scrolling.

Reported by jmleyba on 2015-02-17 18:12:53

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

thanks for the info, when the new jar is expected to be available?.

Reported by manvendra.mishra90 on 2015-02-18 08:56:14

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

i compiled and tried but still getting the same problem, Element not visible.
Any help will be appreciated.

Reported by manvendra.mishra90 on 2015-02-25 13:43:11

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi,

Will this issue be fixed in next version of Selenium Web driver?

Reported by vijays79 on 2015-03-04 10:47:20

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

any info about the issue fixing..?

Reported by manvendra.mishra90 on 2015-05-12 12:20:34

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 17:47:30

  • Labels added: Restrict-AddIssueComment-Commit

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant