Only 3 steps take you to quickly learn the use of Selenium tools

(1)
A plug-in of Selenium IDE Firefox, which helps us understand the test framework. Search and download in the add-on, the general search results are not the first few, you have to click that to see more, find this:
Insert picture description here

After installation, the browser toolbar will have:
Insert picture description here

After installation, click this tab to start:
Insert picture description here

1: Control the running speed of the use case

2: Pause and resume use case execution

3: Single step: You can run a line of commands in a use case.

First enter the URL to be recorded in the address bar, and then enter the corresponding URL in the browser. For example, let's take Baidu as an example:

Step 1: Fill in the URL
Insert picture description here
Step 2: Firefox browser to enter Baidu
Insert picture description here
Step 3:
Click the red dot on the right side of Selenium IDE, then go to the page and click the search box, enter selenium, and click search. Then click the red dot of selenium IDE to end the recording. At this time, you can see that there are records in Selenium IDE:
Insert picture description here

If you want to clear and re-record, you can right-click on the above picture and select Clear All.

the fourth step:

Export according to the steps in the figure above, and you can see the unittest use cases automatically generated by Selenium IDE for you. The writing seems to be very high, but... it is difficult to succeed in running a class, but we can refer to the structure written in it. This is the standard structure, and we will write it in the future.
Insert picture description here
(2) Selenium Builder is
also a plug-in of Firefox:
Insert picture description here

Start method

Right mouse button after installation
Insert picture description here

Click to open:
Insert picture description here

If you exchange experience in software testing, interface testing, automated testing, and interviews. If you are interested, you can add software test communication: 1085991341, and there will be technical exchanges with colleagues.

(3) Usage
Similar to Selenium IDE, the browser should be the url of the current page when you open the page you want to operate. Then click Record, you will find the browser tab will change:

Before clicking Record:
Insert picture description here

After clicking Record:
Insert picture description here

Then perform the operation on the current page, there will be all your clicks in selenium Builder:
Insert picture description here

This tool is very convenient for positioning. When writing, you can go directly to it to copy various positioning methods.
The above content hopes to be helpful to you

Guess you like

Origin blog.csdn.net/waitingwww/article/details/106750505