-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Logical not
doesn't work with browser conditions
#175
Comments
Hey @DmitryShashkov , |
@christian-bromann I am looking onto this issue. |
@christian-bromann i found the issue. When I use wait until it acts like this. browser.waitUntil(urlContains("text")) => browser.waitUntil((this: WebdriverIO.Browser)=> {
const url = await this.getUrl();
....
}) but when i wrap it inside a function then, it becomes: browser.waitUntil(not(urlContains("text"))) => browser.waitUntil(()=>{
const condition = (this: WebdriverIO.Browser)=> {
const url = await this.getUrl();
....
}
return !condition
) Here
|
Nice finding 👍 what would you suggest for a fix? |
@christian-bromann we have two possible solutions: |
i believe later one would be nicer approach. we donot need to make code more complex and wonder where is |
Please go ahead and raise a PR with the approach you have in mind, I think it is better to make a final decision once there is some code. |
@christian-bromann I found the first approach much shorter. 😄 have a look on this PR. |
Hi! I am trying to use
not
together withurlContains
, like this:And get the following error:
In the source code for urlContains, it expects the context to be passed, which works if you don't wrap it:
but doesn't work when wrapped in
not
.I believe the situation is the same for all combinations of logical + browser conditions.
The text was updated successfully, but these errors were encountered: