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

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.
主站蜘蛛池模板: 肃北| 启东市| 周口市| 江川县| 陕西省| 永福县| 桓台县| 南安市| 基隆市| 宜丰县| 大邑县| 桃园市| 上林县| 易门县| 城口县| 连江县| 揭西县| 滕州市| 辽阳市| 湖北省| 伊宁市| 西藏| 东阳市| 民勤县| 夏邑县| 辽宁省| 达拉特旗| 巩义市| 临桂县| 广水市| 河池市| 红原县| 当雄县| 探索| 清流县| 连江县| 通渭县| 宣城市| 吉木萨尔县| 永城市| 舟曲县|