My test scenario is that:
- You go to
url1
- you click button
- you open another tab with
url2
How to I assert the url2
?
I use assert(browser).toHaveUrlContaining('')
But it assert the url1
, so my test was fail
My test scenario is that:
url1
url2
How to I assert the url2
?
I use assert(browser).toHaveUrlContaining('')
But it assert the url1
, so my test was fail
You can try using the browser switchwindow method as you can see here: https://webdriver.io/docs/api/browser/switchWindow/
By doing that I assume that your test would be something like:
Let me know if this helps!