Skip to content

Adding a new by_text element selector helper in tests - #1406

Draft
pgiraud wants to merge 1 commit into
masterfrom
find_by_text
Draft

Adding a new by_text element selector helper in tests#1406
pgiraud wants to merge 1 commit into
masterfrom
find_by_text

Conversation

@pgiraud

@pgiraud pgiraud commented Jun 20, 2024

Copy link
Copy Markdown
Member

No description provided.

Comment thread tests/fixtures/ui.py Outdated

@bersace bersace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

À rebaser

@bersace
bersace marked this pull request as draft June 24, 2024 12:35
@pgiraud
pgiraud force-pushed the find_by_text branch 2 times, most recently from 7eb31ae to 0f0dd3f Compare July 21, 2026 06:37
This is helpful to select an element with the text it contains. The element tag can also
be provided, to be more explicit.
@pgiraud

pgiraud commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

I rebased my branch.

However, I don't think it is worth merging it. While the new helper could be useful in the case where the element we want to select doesn't have an ID, according to selelium's documentation, using XPATH is not recommended. Unless we decide that
setting ID's only for testing purpose is a bad practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants