2017-03-07 6 views
0

iframe形式を最小限に抑えて、通常のページで作業を開始したいと思っています。しかし、私がデフォルトのコンテンツブラウザに切り替えると、データのような生のページにリダイレクトされます。分度器をiframeからデフォルトのコンテンツに変更する

browser.switchTo().frame(iframeLiveChat).then(function(){ console.log("i have entered frame"); driver.findElement(by.xpath(".//*[@id='title']")).click().then(function(){ console.log("i have clicked button"); browser.switchTo().defaultContent(); //After this line the browser redirects itself to :data page instead of the url it has in it. }); }); デフォルトのコンテンツに戻すことはできません。

答えて

0

スイッチをコールバックにしないようにしましたか?

browser.switchTo().frame(iframeLiveChat).then(()=> console.log("i have entered frame")) 
element(by.xpath(".//*[@id='title']")).click().then(()=> console.log("i have clicked button")) 
browser.switchTo().defaultContent(); 
関連する問題