Closed janduris87 closed 9 years ago
I have a feeling that this isn't something I'm going to be able to fix. It's likely that this is browser dependent behavior.
I'll investigate some other browsers to see how they function. I'll let you know if I come up with anything.
After a bit of research this link is all I found.
Ultimately it boils down to the fact that the select box dropdown is actually a native element that exists outside the page (much like an alert). As such, there's no way for selenium to capture an image of it.
With that being said, I'm sure you could use a library like pyscreenshot to capture the image you're wanting to capture.
Sorry I wasn't able to help more.
Hi, I need to take a screenshot of firefox page with unrolled element "select". After click on "select" element, full list of options is visible. When I take a picture with keyword "Capture Page Screenshot", this screenshot contain my "select" element... this element have focus also, but list of options is not visible on the picture. Why?
Example:
On the left side of picture is screen created by "Capture Page Screenshot" and on the right side is screenshot which i want to take: <SOURCE: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select>
I tried use keyword "Execute Javascript" and set default value of attribute "size" of element "select" to higher value (default size="1"), but this workaround isn't useful everytime.
Execute Javascript return (function(){jQuery('element').attr('size',"10");})();