Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Missing support for RelativeBy in annotations #14881

Open
gryznar opened this issue Dec 9, 2024 · 5 comments · May be fixed by #15050
Open

[🐛 Bug]: Missing support for RelativeBy in annotations #14881

gryznar opened this issue Dec 9, 2024 · 5 comments · May be fixed by #15050

Comments

@gryznar
Copy link

gryznar commented Dec 9, 2024

What happened?

Despite the code will handle that properly, annotations are unadjusted to RelativeBy. First of all: find_element() and find_elements():
image
None of them has annotation for by. In both cases, it should be: Union[ByType, RelativeBy]:
image

Another case are conditions in expected_conditions.py:
image

Here annotations for locator are: Tuple[str, str], whereas it should be: Union[Tuple[ByType, str], Tuple[RelativeBy, None]]. Same applies for other conditions.

How can we reproduce the issue?

n/a

Relevant log output

n/a

Operating System

n/a

Selenium version

4.24.0 for Python

What are the browser(s) and version(s) where you see this issue?

n/a

What are the browser driver(s) and version(s) where you see this issue?

n/a

Are you using Selenium Grid?

n/a

Copy link

github-actions bot commented Dec 9, 2024

@gryznar, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@gryznar gryznar changed the title [🐛 Bug]: Missing support for RelativeBy in annotations in various places [🐛 Bug]: Missing support for RelativeBy in annotations Dec 9, 2024
@gryznar gryznar changed the title [🐛 Bug]: Missing support for RelativeBy in annotations [🐛 Bug]: Missing support for RelativeBy in annotations Dec 9, 2024
@shbenzer
Copy link
Contributor

shbenzer commented Jan 8, 2025

Thank you for raising this issue @gryznar. If you could provide a PR for this, the team would be happy to take a look.

@gryznar
Copy link
Author

gryznar commented Jan 8, 2025

Just plain changes? Or sth more is required? That's why I didn't created pr

@shbenzer
Copy link
Contributor

shbenzer commented Jan 8, 2025

I'm referring to creating a PR with your suggested changes to see if it works/enhances as you suggest. I'm not sure if more is required, so I'm asking you to give it a shot if you have the time.

You can refer to our Contribution guide for instructions on how to do so.

Regardless, thank you for taking the time to raise this issue - we are always grateful to hear back from the community.

@gryznar
Copy link
Author

gryznar commented Jan 8, 2025

@shbenzer Here you go: #15050. I am not sure about shadow root. I've added also according to declared support in docs

@gryznar gryznar linked a pull request Jan 8, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants