storeAttribute(.{}elementLocator@attributeName,variableName.{})
	    把指定元素的屬性的值賦予給變量
	    storeAttribute  input1@class   classOfInput1
	    verifyAttribute  input2@class  $.{classOfInput1}
	    chooseCancel.., answer..
	    chooseCancelOnNextConfirmation()
	    - 當(dāng)下次JavaScript彈出confirm對話框的時(shí)候,讓selenium選擇Cancel
	    - 如果沒有該命令時(shí),遇到confirm對話框Selenium默認(rèn)返回true,如手動(dòng)選擇OK按鈕一樣
	    chooseCancelOnNextConfirmation      
	    - 如果已經(jīng)運(yùn)行過該命令,當(dāng)下一次又有confirm對話框出現(xiàn)時(shí),也會(huì)同樣地再次選擇Cancel
	    answerOnNextPrompt(answerString)
	    - 在下次JavaScript彈出prompt提示框時(shí),賦予其anweerString的值,并選擇確定
	    answerOnNextPrompt  Kangaroo  
Assertions
允許用戶去檢查當(dāng)前狀態(tài)。兩種模式: Assert 和 Verify, 當(dāng)Assert失敗,則退出測試;當(dāng)Verify失敗,測試會(huì)繼續(xù)運(yùn)行。
	    assertLocation, assertTitle
	    assertLocation(relativeLocation)
	    判斷當(dāng)前是在正確的頁面
	    verifyLocation  /mypage  
	    assertLocation  /mypage  
	    assertTitle(titlePattern)
	    檢查當(dāng)前頁面的title是否正確
	    verifyTitle  My Page  
	    assertTitle  My Page  
	    assertValue
	    assertValue(inputLocator, valuePattern)
	    - 檢查input的值
	    - 對于 checkbox或radio,如果已選擇,則值為"on",反之為"off"
	    verifyValue  nameField  John Smith
	    assertValue  document.forms[2].nameField  John Smith
	    assertSelected, assertSelectedOptions
	    assertSelected(selectLocator, optionSpecifier)
	    檢查select的下拉菜單中選中的選型是否和optionSpecifer(Select選擇選項(xiàng)器)的選項(xiàng)相同
	    verifySelected  dropdown2  John Smith
	    verifySelected  dorpdown2  value=js*123
	    assertSelected  document.forms[2].dropDown  label=J*Smith
	    assertSelected  document.forms[2].dropDown  index=0
	    assertSelectOptions(selectLocator, optionLabelList)
	    - 檢查下拉菜單中的選項(xiàng)的文本是否和optionLabelList相同
	    - optionLabelList是以逗號(hào)分割的一個(gè)字符串
	    verifySelectOptions  dropdown2  John Smith,Dave Bird
	    assertSelectOptions  document.forms[2].dropdown  Smith,J,Bird,D
	    assertText
	    assertText(elementLocator,textPattern)
	    - 檢查指定元素的文本
	    - 只對有包含文本的元素生效
	    - 對于Mozilla類型的瀏覽器,用textContent取元素的文本,對于IE類型的瀏覽器,用innerText取元素文本
	    verifyText  statusMessage  Successful
	    assertText  //div[@id='foo']//h1  Successful
	    assertTextPresent, assertAttribute
	    assertTextPresent(text)
	    檢查在當(dāng)前給用戶顯示的頁面上是否有出現(xiàn)指定的文本
	    verifyTextPresent  You are now logged in  
	    assertTextPresent  You are now logged in  
	    assertAttribute(.{}elementLocator@attributeName.{}, ValuePattern)
	    檢查當(dāng)前指定元素的屬性的值
	    verifyAttribute  txt1@class  bigAndBlod
	    assertAttribute  document.images[0]@alt  alt-text
	    verifyAttribute  //img[@id='foo']/alt  alt-text
	    assertTextPresent, etc.
	    assertTextPresent(text)
	    assertTextNotPresent(text)
	    assertElementPresent(elementLocator)
	    verifyElementPresent  submitButton  
	    assertElementPresent  //img[@alt='foo']     assertElementNotPresent(elementLocator)
	    assertTable
	    assertTable(cellAddress, valuePattern)
	    - 檢查table里的某個(gè)cell中的值
	    - cellAddress的語法是tableName.row.column, 注意行列序號(hào)都是從0開始
	    verifyTable  myTable.1.6  Submitted
	    assertTable  results0.2  13
	    assertVisible, nonVisible
	    assertVisible(elementLocator)
	    - 檢查指定的元素是否可視的
	    - 隱藏一個(gè)元素可以用設(shè)置css的'visibility'屬性為'hidden',也可以設(shè)置'display'屬性為'none'
	    verfyVisible  postcode  
	    assertVisible  postcode  
	    assertNotVisible(elementLocator)
	    verfyNotVisible  postcode  
	    assertNotVisible  postcode  
	    Editable, non-editable
	    assertEditable(inputLocator)
	    檢查指定的input是否可以編輯
	    verifyEditable  shape  
	    assertEditable  colour  
	    assertNotEditable(inputLocator)
	    檢查指定的input是否不可以編輯
	    assertAlert
	    assertAlert(messagePattern)
	    - 檢查JavaScript是否有產(chǎn)生帶指定message的alert對話框
	    - alert產(chǎn)生的順序必須與檢查的順序一致
	    - 檢查alert時(shí)會(huì)產(chǎn)生與手動(dòng)點(diǎn)擊'OK'按鈕一樣的效果。如果一個(gè)alert產(chǎn)生了,而你卻沒有去檢查它,selenium會(huì)在下個(gè)action中報(bào)錯(cuò)。
	    - 注意:Selenium 不支持 JavaScript 在onload()事件時(shí) 調(diào)用alert();在這種情況下,Selenium需要你自己手動(dòng)來點(diǎn)擊OK.
	    assertConfirmation
	    assertConfirmation(messagePattern)
	    - 檢查JavaScript是否有產(chǎn)生帶指定message的confirmation對話框和alert情況一樣,confirmation對話框也必須在它們產(chǎn)生的時(shí)候進(jìn)行檢查
	    - 默認(rèn)情況下,Selenium會(huì)讓confirm() 返回true, 相當(dāng)于手動(dòng)點(diǎn)擊Ok按鈕的效果。你能夠通過chooseCancelOnNextConfirmation命令讓confirm()返回false.同樣 地,如果一個(gè)cofirmation對話框出現(xiàn)了,但你卻沒有檢查的話,Selenium將會(huì)在下個(gè)action中報(bào)錯(cuò)
	    - 注意:在Selenium的環(huán)境下,confirmation對話框框?qū)⒉粫?huì)再出現(xiàn)彈出顯式對話框
	    - 注意:Selenium不支持在onload()事件時(shí)調(diào)用confirmation對話框,在這種情況下,會(huì)出現(xiàn)顯示confirmatioin對話框,并需要你自己手動(dòng)點(diǎn)擊。
	    assertPrompt
	    assertPrompt(messagePattern)
	    - 檢查JavaScript是否有產(chǎn)生帶指定message的Prompt對話框
	    - 你檢查的prompt的順序Prompt對話框產(chǎn)生的順序必須相同
	    - 必須在verifyPrompt之前調(diào)用answerOnNextPrompt命令
	    - 如果prompt對話框出現(xiàn)了但你卻沒有檢查,則Selenium會(huì)在下個(gè)action中報(bào)錯(cuò)
	    answerOnNextPrompt  Joe  
	    click  id=delegate  
	    verifyPrompt  Delegate to who?  
Parameters and Variables
	參數(shù)和變量的聲明范圍由簡單的賦值到JavaScript表達(dá)式賦值。
	Store,storeValue 和storeText 為下次訪問保存值。
	在Selenium內(nèi)部是用一個(gè)叫storeVars的map來保存變量名。
	    Variable Substitution 變量替換
	    提供了一個(gè)簡單的方法去訪問變量,語法 $.{xxx}
	    store  Mr  title
	    storeValue  nameField  surname
	    store  $.{title} $.{suname}  fullname
	    type  textElement  Full name is: $.{fullname}
	    JavaScript Evaluation JavaScript賦值
	    你能用JavaScript來構(gòu)建任何你所需要的值。
	    這個(gè)參數(shù)是以javascript開頭,語法是 javascript.{'with a trailing'}。
	    可以通過JavaScript表達(dá)式給某元素賦值。
	    store  javascript.{'merchant'+(new Date()).getTime()}  merchantId
	    type  textElement  javascript.{storedVars['merchantId'].toUpperCase()}