Skip to content

Add new expected conditions + unit tests - #371

Merged
OndraM merged 8 commits into
php-webdriver:communityfrom
OndraM:feature/expected-conditions-improvements
Jan 8, 2017
Merged

OndraM merged 8 commits into
php-webdriver:communityfrom
OndraM:feature/expected-conditions-improvements

Conversation

@OndraM

@OndraM OndraM commented Dec 17, 2016 •

Copy link
Copy Markdown
Collaborator

Inspired by official Java, Python and Javascript bindings, following new expected conditions were added:

  • titleMatches
  • elementTextIs
  • elementTextMatches
  • elementTextContains (as an alias for textToBePresentInElement)
  • numberOfWindowsToBe

Also, in #370, the urlIs, urlContains and maybe urlMatches conditions will be added as well.

For consistency, I also suggest deprecating the textToBePresentInElement() condition in favor of the elementTextContains. It s IMHO easier to find with code-completion in IDE, and the naming will be much more systematic and readable:

  • elementText[Is, Matches, Contains]
  • title[Is, Matches, Contains]
  • url[Is, Matches, Contains]

What does other think about this change?

@OndraM
OndraM force-pushed the feature/expected-conditions-improvements branch from b280a51 to aa90f69 Compare January 8, 2017 01:52
@OndraM
OndraM merged commit 88dc436 into php-webdriver:community Jan 8, 2017
@OndraM
OndraM deleted the feature/expected-conditions-improvements branch November 14, 2019 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants