- Selenium Essentials
- Prashanth Sams
- 398字
- 2021-07-23 19:51:38
WebDriver playback
The WebDriver playback feature in Selenium IDE lets you run tests in any one of the most popular web browsers: Chrome, Firefox, HtmlUnit, Internet Explorer, and Opera. By default, the WebDriver playback feature is turned off and is inactive. To run Selenium IDE scripts through WebDriver, turn on the WebDriver playback settings.
Launch the Selenium IDE and choose Selenium IDE Options from the Options menu. Switch to the WebDriver tab and select the Enable WebDriver checkbox. Now, restart the Selenium IDE to enable the WebDriver playback feature. However, on changing the browser name, restarting the IDE is not necessary. The idea discussed in these two paragraphs is shown in the following screenshot:

Prerequisites for the WebDriver playback feature
The following are the prerequisites that need to be fulfilled to enable the WebDriver playback feature:
Selenium Server can be initialized manually from the terminal or Command Prompt. Open the terminal or Command Prompt, locate the Selenium Server JAR file, and run the command using the following syntax:
java -jar selenium-server-standalone-<version-number>.jar
Now you can run the command:
java -jar selenium-server-standalone-2.44.0.jar

Click on the Selenium IDE Play button to drive tests through WebDriver. To run tests in the Chrome web browser, replace the text
firefox
with chrome
under the Selenium IDE options, as shown in the following screenshot:

By default, it is essential to set the ChromeDriver path in your working machine. Download the latest ChromeDriver extension from http://chromedriver.storage.googleapis.com/index.html?path=2.9/.
Follow these configuration steps to set the ChromeDriver extension path for different platforms.
On Windows:
- Double-click and open the My Computer window.
- Right-click anywhere on the window and select Properties.
- Click on Advanced System settings.
- Click on Environment Variables from System Properties.
- Under System variables, select the variable named Path and click on the Edit button.
- Now, extract the downloaded ChromeDriver package and copy the location path.
- Paste the extracted location in Path (under System variables) and click on OK.
On Linux:
Open the terminal and run the following command:
$ wget http://chromedriver.storage.googleapis.com/2.7/chromedriver_linux64.zip $ Unzip chromedriver_linux64.zip $ cp chromedriver /usr/local/bin $ chmod +x /usr/local/bin/chromedriver
On Mac:
- JBoss Weld CDI for Java Platform
- Python數(shù)據(jù)分析入門與實戰(zhàn)
- 微服務(wù)與事件驅(qū)動架構(gòu)
- 精通軟件性能測試與LoadRunner實戰(zhàn)(第2版)
- SQL語言從入門到精通
- Python王者歸來
- Access 2010數(shù)據(jù)庫基礎(chǔ)與應(yīng)用項目式教程(第3版)
- 游戲程序設(shè)計教程
- Highcharts Cookbook
- BeagleBone Black Cookbook
- PySide 6/PyQt 6快速開發(fā)與實戰(zhàn)
- Yii Project Blueprints
- Cocos2d-x Game Development Blueprints
- Mastering Elixir
- Arduino電子設(shè)計實戰(zhàn)指南:零基礎(chǔ)篇