-
Notifications
You must be signed in to change notification settings - Fork 508
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
Finding partial text #608
Comments
I'm on a windows machine so I cannot set up a dev environment to test this myself, if @Qqwy or someone else can test this implementation for me I would appreciate it.
@andrewsmedina Hi, is anyone working on this? if not, then can I take it up? |
Bump this. I think is a crucial feature, because text is not always known completely. For achiving this, maybe regex could be a very nice input to represent lookup in a more flexible way. |
I was having trouble matching some text and saw this issue while looking for possible explanations. It may just be a version difference (I'm using 0.11.0) since this was opened, or perhaps I'm using a different driver, but I don't see this behavior with I can match partial text just fine. FWIW, the problem I was having was with matching text that spanned more than one element. I looked at the implementation and see that it's just calling roughly Edit: I did notice, however, that |
Do not know if this issue was solved, but what about the contains() function in XPath, might help with the whole partial text issue. |
It is very common that you want to look for a snippet of text, rather than a text element that as a whole contains exactly what you look for; like when looking for a username on a page.
The current
browser.is_text_present
however only matches a text element 1:1. (and the documentation about this is not very clear that this is what is going on).So if we have
Then
browser.is_text_present("DeathSlayer")
will return false, as willbrowser.is_text_present("Welcome, DeathSlayer")
(because of the missing exclamation mark).Could another command be introduced for this?
The text was updated successfully, but these errors were encountered: