Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Selenium (2)-- webdriver starts

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

A brief introduction to Webdriver

The main new feature of Selenium 2.0 is the integration of webdriver API. Webdriver is designed not only to address some of the limitations of selenium RC API, but also to provide a simpler and concise programming interface. It provides better support for dynamic web pages.

Selenium RC adopts the same drive mode for every browser it supports. First, the client of Selenium RC establishes contact with the server, and then the server starts a browser. When the browser is loaded, it inserts javascript and is driven by javascript. Webdriver takes a completely different approach. Instead of using javascript to drive the browser, it invokes the browser directly, and the browser uses its own support for automation to work.

II. Environmental deployment

1. Download and install eclipse and jdk

two。 Download selenium-java-2.32.0 from http://seleniumhq.org/download/ and import the downloaded jar package selenium-java-2.32.0.jar in the project established by eclipse. If you only import this package and report an error at run time, then decompress the downloaded zip file directly and import all the packages in libs.

Click Help- > Install new software-> click Add in the configuration TestNG,Eclipse in 3.eclipse (figure below), and then next all the time. Restart eclipse after installation.

4. Right-click on the new Java project created by eclipse-> build path- > configure build path- > Libraries, and add testNG's jar package testng-6.8.1.jar.

Once this is done, we can use selenium webdriver+testNG to write our test code for testing.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report