Open jerilseb opened 7 years ago
You could use switchToNewTab: true
in the constructor, then instead of waiting for there to be two tabs, just wait for a selector or something that should be in the page loaded in the new tab.
Also as a side note, there is no need to wrap the horseman stuff in new Promise
, it is already a Promise.
Hi, I am opening a new tab via .click() on a button. Currently, I'm doing this
I cannot use openTab(url) since I don't have the url, and the tab creation is done through javascript.
Is there a better way to do this? Waiting for a fixed time doesn't seem like a good idea.
Thanks in advance.