我复制了 URL 文本并使用量角器粘贴到新的 window 浏览器中,但它正在加载显示对象对象而不是实际 URL
I copied the URL text and paste in a browser new window using protractor but it is loading showing object object instead of actual URL
我的实际 URL 是 https://wallboard.ef.com/dashboard/1
//open in a new tab
var text=browser.actions().sendKeys(protractor.Key.CONTROL, 'v');
browser.executeScript("window.open('"+text+"')");
结果 URL 在浏览器中过去是 https://wallboard.ef.com/[object%20Object]
如何在浏览器新标签
中获取上面提到的实际URL
我已经更改了代码,现在我使用了从剪贴板读取的代码。
browser.executeScript("navigator.clipboard.readText().then(text => {window.open(text)});");
我的实际 URL 是 https://wallboard.ef.com/dashboard/1
//open in a new tab
var text=browser.actions().sendKeys(protractor.Key.CONTROL, 'v');
browser.executeScript("window.open('"+text+"')");
结果 URL 在浏览器中过去是 https://wallboard.ef.com/[object%20Object] 如何在浏览器新标签
中获取上面提到的实际URL我已经更改了代码,现在我使用了从剪贴板读取的代码。
browser.executeScript("navigator.clipboard.readText().then(text => {window.open(text)});");