Groups
Groups
Sign in
Groups
Groups
日本Seleniumユーザーコミュニティ
Conversations
Labels
About
Send feedback
Help
手動で開いたChromeブラウザのページをWebDriverに入れることはできますか?
1,953 views
Skip to first unread message
タカダゴゼン
unread,
Apr 26, 2017, 2:22:05 AM
4/26/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Seleniumユーザーコミュニティ
手動でChromeを立ち上げたブラウザを、
driver.switchTo() などを利用して
WebDriverに入れる方法はあるのでしょうか?
理想は、手動で開いたChromeブラウザに新しいタブで、新規のページをプログラムで
開きたいです。
以上、よろしくお願いいたします。
伊藤望
unread,
Apr 28, 2017, 11:27:59 PM
4/28/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Seleniumユーザーコミュニティ
とても難しいと思います。
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/18
https://github.com/caoilte/browser_testing_demo/blob/master/src/main/java/com/playfish/service/console/ReusableFirefoxDriver.java
このあたりにFirefoxやIEで頑張ってなんとかするやり方が載っていますが、
Chromeで動くかは不明です。
何がしたいかによっては、代替案があると思います。
たとえばChromeDriverの引数のuser-data-dir指定で、
普段と同じユーザープロファイルを使ってChromeを起動することができるので、
起動してずっとquitしないようにしておけば、
手動の時と同じ設定かつ自動でも手動でも操作できるChromeになると思います。
Reply all
Reply to author
Forward
0 new messages