You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Automated end-to-end tests are a powerful tool for your team to ship faster and with more confidence. End-to-end tests automate UI interactions and can validate the functionality of your applications. To this end, we are announcing Playwright for Python in preview today. Playwright enables developers and testers to write reliable end-to-end tests in Python. Get started by installing Playwright fro
はじめに Python + Selenium + Chrome で、要素の取得、クリックなどの UI系の操作、待機、ページ全体のスクリーンショットなど、一通り試してみます。 PhantomJS はもう更新されないということなので、ブラウザは Chrome にします。 この記事には、Selenium の API に関する情報と Chrome に特化した情報がありますが、前者の Selenium の使い方に関する情報は Firefox など別のブラウザでも使えます。 注意事項 ウェブの自動テストやスクレイピングで使われる技術です。特にスクレイピングでは、著作権の問題や、サーバー側の負荷、各種規約(会員としてログインする場合の会員規約等)やマナーなどを考慮する必要があります。 たとえば、Twitter など利用規約で明示的にスクレイピングが禁止されていることや、robot.txt などでクローリ
Puppeteer というJavaScriptでchromeを自動操作するライブラリが最近話題になっていました。 私もPythonでSeleniumの代わりに使えるものがほしかったので、puppeteerをPythonに移植し、pyppeteerという名前で公開しました。 Puppeteerについては下記Qiitaの投稿が参考になるかと思います。 –headless時代の本命? Chrome を Node.jsから操作するライブラリ puppeteer について - Qiita 使用上の注意 まだ作ったばかり&テスト不十分なのでバグがあると思います。 なので試す時は「うまく動いたらラッキー」くらいの人柱精神でお願いします。 特にwindowsでは全くテストしていないので動かないかもしれません。 一応自分でwdomのテストに使ってみましたが、Webページのテストに使う分には意外と大丈夫です。
>>> from chromote import Chromote >>> chrome = Chromote() >>> chrome Chromote(host="localhost", port=9222) >>> print chrome [Chromote(tabs=1)] >>> tab = chrome.tabs[0] >>> print tab Google - https://www.google.co.uk/ >>> print tab.url https://www.google.co.uk/ >>> tab.reload() '{"result":{},"id":1}' >>> tab.set_url('https://github.com/chromote') '{"id":2,"result":{}}' >>> tab.set_zoom(1.2) '{"id":
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く