此内容来自第三方平台 (Dailymotion)。如果此视频侵犯了您的版权,请使用 立即删除 工具。
Selenium 2 and Junit example
描述
We run software Testing workshops.
see www.time2test.co.uk
Selenium 2 and jUnit example
1. use the already created script
2. open up eclipse IDE
3. creat a java project on Eclipse IDE
4. give it a name: Selenium2JavaScript
5. click on Next and Finish
6. create a package for the project
Source folder: Selenium2javaSciprt/src
Name:com.example.tests
7. click on Finish
8. create a java file
New->Class
Name: TestJava
9. Now convert a .html file to .java file
10. open up Selenium IDE and export test case as jUNit4 (webdriver) as .java
11. open up the java file in notepad++
12. copy the saved java file directly into Eclipse
13. Ensure that class name and .java file file name is the same
14. now add the selenium 2 jar and jUnit jar
15 Right click on project->Properties - select java Build Path-> External Jars
16. select jUnit 4.7
17. we have already added the selenium 2 jars to the library so first add selenium 2 jars using "add external jars" button
18. Now Run the Project
19. right click on project->Run As->jUnit Test
20. tick "use configuration specific settings"
21. select jUnit Specific settings
22 . notice the test will execute
23. Green indicates the script run successfully
24. end
see www.time2test.co.uk
Selenium 2 and jUnit example
1. use the already created script
2. open up eclipse IDE
3. creat a java project on Eclipse IDE
4. give it a name: Selenium2JavaScript
5. click on Next and Finish
6. create a package for the project
Source folder: Selenium2javaSciprt/src
Name:com.example.tests
7. click on Finish
8. create a java file
New->Class
Name: TestJava
9. Now convert a .html file to .java file
10. open up Selenium IDE and export test case as jUNit4 (webdriver) as .java
11. open up the java file in notepad++
12. copy the saved java file directly into Eclipse
13. Ensure that class name and .java file file name is the same
14. now add the selenium 2 jar and jUnit jar
15 Right click on project->Properties - select java Build Path-> External Jars
16. select jUnit 4.7
17. we have already added the selenium 2 jars to the library so first add selenium 2 jars using "add external jars" button
18. Now Run the Project
19. right click on project->Run As->jUnit Test
20. tick "use configuration specific settings"
21. select jUnit Specific settings
22 . notice the test will execute
23. Green indicates the script run successfully
24. end
关键词与标签
相关视频
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium[240P]
videoupload Videoupload2014 7
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium
Videoupload2014 1
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium
Videoupload2014 4
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium
Renu
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium
Ldata0005
Selenium Webdriver Example Selenium Training Videos Selenium Testing Maven ANT JUNIT TEstNG Selenium[240P]
Videoupload2014 11