Skip to content

[πŸ› Bug]: select dropdown is misplaced in screenshot on ChromeΒ #15675

@khanxmetu

Description

@khanxmetu

Description

Hi,

When taking the screenshot via Chrome webdriver having select drop-down list expanded, the drop-down list is misplaced with some offset:

Image

From older discussion: https://groups.google.com/g/selenium-users/c/eWYRig7c1C4 This should have been not expanded at all.

Was there any attempt to make it work or has anything changed since causing it to be rendered though misplaced?

Reproducible Code

<html>
<body>
<label for="sort-select">Sorted by:</label>
<select id="my-select">
  <option>---------</option>
  <option>foo</option>
  <option>bar</option>
  <option>baz</option>
</select>
</body>
</html>



from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
s=driver.find_element(By.TAG_NAME, "select")
s.click()
driver.get_screenshot_as_file('a.png')

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsD-chromeI-defectSomething is not working as intendedOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions