First, the name of the experiment
Selenium on-Machine experiment
II. objectives of the experiment
1. Install seleniumide plug-in
2. Learn to use Seleniumide to record scripts and export scripts
3, Access http://www.ncfxy.com Use the number of login system (account name is the school number, the password for the school number after 6 ), enter the system can see the user's mailbox.
4, write Selenium Java webdriver program, test info.csv form the number and the correspondence between the mailbox is correct.
5. Submit the test code to GitHub .
Third, the contents and steps of the experiment
1. Open the Firefox browser and install the selenium ide,firebug and Firepath plugins in the browser.
2, open the Selenium IDE plug-in, enter the recording status, and then enter the cfxy.com in the browser to operate. After you finish recording, run the script that you just recorded to see if the recording was successful.
3. Export the recorded script as a Java JUnit4 webdriver script to add code to the Ecplise project
4, in the project to read the information in the Info.csv, and then modify the code just added to complete the info.csv all the accounts and mailbox comparison.
5, run the code, the code runs through.
Iv. problems encountered in experiments and their solutions
When the script for the Selenium IDE is exported intact and moved all the way to the Eclipse project, the scripts that were originally able to run smoothly are wrong
The error messages are: Org.openqa.selenium.WebDriverException:Element is not clickable at point(496.20001220703125, 514). Other element would receive the click: <div class= "container" ></div>
After checking that this is because the default is not full screen when you open the firefox browser using webdriver , and my screen resolution causes the button to be determined to be the bottom line of the page by default. Copyright ... obscured and cannot be clicked. There are two workarounds: one is to add driver.manage () to the Code . window (). Maximize ();
The button is not obscured even if the window is maximized when Webdriver opens the browser. Another way is to change the resolution of the system. If the resolution is smaller, the OK button will move outside the window,webdriver will drag the scrollbar and then click the button, and if the resolution becomes larger, then the OK button will move up and not be obscured.
LAB2 test report of software testing