Selenium Webdriver automated testing design (webdriver automated architecture design, interface definition, log processing, Java Robot applications), webdriverrobot

Source: Internet
Author: User

Selenium Webdriver automated testing design (webdriver automated architecture design, interface definition, log processing, Java Robot applications), webdriverrobot

 

I would like to share with you a set of courses. If you are interested, you can add me 2748165793

 

For more free information, see http://blog.sina.com.cn/sonyandnokia

Happy Park of mainong

 

Course outline

1st chapter:

Course Overview

Selenium Introduction

Introduction to webdirver

Webdriver Environment Construction

 

Section 2nd

Introduction to Selenium IDE

The IDE instance explains the recording and playback process.

Export of recording script

Introduction and installation of IDE plug-ins

 

Section 3rd

Selenium Object Recognition Method

Including: id, name, class name, link text, partial link text, tag name, xpath, css

 

The following common methods are described based on specific instances:

Set script timeout

Browser operations

 

Section 4th

Describes the following common methods based on specific instances:

Click

Select

SendKeys

GetAttribute

SwitchTo (). window ("")

SwitchTo (). frame ("")

SwitchTo (). alert (). accept ()

 

 

Section 5th

The following common methods are described based on specific instances:

Get status

Action

Upload files

Execute JS

Browser window Switching

The following example shows how to use the preceding webdriver api when you log on to the Apsara stack console and modify your personal information.

 

Section 6th

An overview of the concept of automated architecture design the design purpose and purpose of specific classes, including:

BaseLib

SeleniumBase Lib

BusinessLib

ObjectStore Interface

MethodOutputMessage Interface

InputDataStore Interface

Config. properties File

 

Section 7th

 

Overview how to Generate debug-level test reports and regression test reports

Summarize the benefits of Architecture Design

Java Robot class Introduction

This section describes how to select a file to be uploaded in the windows window during file upload.

 


Selenium automated testing: use java to write test scripts for Logon

First, you must have basic HTML knowledge.
The following is a simple example. Besides, it is not selenium, but webDerive or webtest.
Import org. openqa. selenium. by; import org. openqa. selenium. webDriver; import org. openqa. selenium. webElement; import org. openqa. selenium. ie. internetExplorerDriver; import org. openqa. selenium. support. ui. expectedCondition; import org. openqa. selenium. support. ui. webDriverWait; public class Test {public static void main (String [] args) {// create a WebDriver instance System. setProperty ("webdriver. ie. driver "," Driver \ IEDriverServer.exe "); WebDriver driver = new InternetExplorerDriver (); // access Baidu driver. get ("www.baidu.com"); // another driver. navigate (). to ("www.google.com"); // find the text box WebElement element = driver. findElement (. name ("q"); // search for the keyword element. sendKeys ("selenium"); // The webDriver of the submit form automatically finds the submit button from the form and submits the element. submit (); // check the titleSystem page. out. println ("page Title:" + driver. getTitle (); // set the wait time to 10 seconds (new WebDriverWait (driver, 10 )). until (new ExpectedCondition <Boolean> () {@ Overridepublic Boolean apply (WebDriver d) {// TODO Auto-generated method stubreturn d. getTitle (). toLowerCase (). startsWith ("selenium") ;}}); // display the query result titleSystem. out. println ("Page title I ...... remaining full text>
 
Automated Testing: How does WebDriver locate the hyperlink on the floating div After hovering?

Actions needs to import the corresponding package
You also know that you want to use mouseOver () in Actions ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.