Groups
Groups
Sign in
Groups
Groups
日本Seleniumユーザーコミュニティ
Conversations
Labels
About
Send feedback
Help
selenium で表示させて、エクセルにコピペ のようなことはできるでしょうか?
956 views
Skip to first unread message
tadashi nagao
unread,
Aug 10, 2015, 6:05:30 AM
8/10/15
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ユーザーコミュニティ
質問ですみません。表題のは無理としても、ファイルに保存できれば、そこそこいけそうな気がします。
selenium で画面を開いて、スクリーンショットをとるのはできるのですが、HTMLを保存することはできるのでしょうか?
http://qiita.com/oh_rusty_nail/items/6757af94df456260b860
などをみるとできそうな気がします。
伊藤望
unread,
Aug 10, 2015, 8:26:32 AM
8/10/15
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ユーザーコミュニティ
伊藤です。
driver.getPageSourceメソッドというメソッドがあるので、そちらが簡単かと思います。
これでHTMLを文字列としてとれるので、あとはプラグラミング言語ごとの適当なライブラリを使って
文字列をファイル保存すればいいと思います。
文字列をExcelに書き込むなら、やはり言語ごとの適当なExcel操作ライブラリを探してこれば、
指定したセルのテキストとして書き込むくらいならそんなに難しくないと思います。
らんさぶ
unread,
Aug 10, 2015, 9:52:12 AM
8/10/15
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ユーザーコミュニティ
らんさぶです
Excelに持ってくるのが主旨であれば SeleniumVBAが一番楽ではないかと。
以上
らんさぶ
unread,
Aug 10, 2015, 9:58:06 AM
8/10/15
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ユーザーコミュニティ
らんさぶです
連投ですいません
URLが変わっていたのに気がつきませんでした。
http://florentbr.github.io/SeleniumBasic/
7/20 が最新版で WD2.46.0 まで反映されていますね。
(何処かに合わせたのか 謎のバージョンナンバーになってますが)
以上
tadashi nagao
unread,
Aug 10, 2015, 10:44:03 PM
8/10/15
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ユーザーコミュニティ
確かにそうですね。書式までせおったコピペがしたかったのですが、そういう用途ならスクリーンショットがよさげでした。ただ、横に長いページの場合には、全部のスクリーンショットがとれないようです。
2015年8月10日月曜日 22時52分12秒 UTC+9 らんさぶ:
らんさぶです
Excelに持ってくるのが主旨であれば SeleniumVBAが一番楽ではないかと。
以上
Reply all
Reply to author
Forward
0 new messages