官术网_书友最值得收藏!

Scraping Python.org with Selenium and PhantomJS

This recipe will introduce Selenium and PhantomJS, two frameworks that are very different from the frameworks in the previous recipes. In fact, Selenium and PhantomJS are often used in functional/acceptance testing. We want to demonstrate these tools as they offer unique benefits from the scraping perspective. Several that we will look at later in the book are the ability to fill out forms, press buttons, and wait for dynamic JavaScript to be downloaded and executed.

Selenium itself is a programming language neutral framework. It offers a number of programming language bindings, such as Python, Java, C#, and PHP (amongst others). The framework also provides many components that focus on testing. Three commonly used components are:

  • IDE for recording and replaying tests
  • Webdriver, which actually launches a web browser (such as Firefox, Chrome, or Internet Explorer) by sending commands and sending the results to the selected browser
  • A grid server executes tests with a web browser on a remote server. It can run multiple test cases in parallel.
主站蜘蛛池模板: 沈丘县| 平泉县| 星子县| 饶平县| 卫辉市| 准格尔旗| 保亭| 普格县| 平陆县| 茂名市| 长春市| 班玛县| 嘉鱼县| 萝北县| 临沧市| 云霄县| 德化县| 视频| 原阳县| 孟津县| 宝坻区| 从化市| 深水埗区| 徐州市| 大渡口区| 兴隆县| 渑池县| 晋江市| 西充县| 东源县| 凤山县| 天祝| 沽源县| 神池县| 大关县| 昆明市| 扶绥县| 濉溪县| 万荣县| 宜宾市| 临漳县|