com.webmbt.plugin
Class WebPluginAncestor

java.lang.Object
  extended by com.webmbt.plugin.PluginAncestor
      extended by com.webmbt.plugin.WebPluginAncestor
All Implemented Interfaces:
MScriptInterface, MScriptMethodIntf
Direct Known Subclasses:
HtmlUnitPlugin, SeleniumPlugin

public abstract class WebPluginAncestor
extends PluginAncestor
implements MScriptMethodIntf

Abstract class, ancestor of all MBT web app plugins.

Author:
yxl01

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webmbt.plugin.MScriptInterface
MScriptInterface.MSCRIPT_METHOD
 
Constructor Summary
WebPluginAncestor()
           
 
Method Summary
static java.lang.String convertKeyString(java.lang.String keyString_p)
           
abstract  void openURL(java.lang.String url_p)
          opens the url passed in and set it to be current page.
abstract  void setBrowserCmd(java.lang.String browserCmd_p)
          changes the browser before the MBT execution is started.
 void setInitParams(java.lang.String[] paramList_p)
          INTERNAL USE ONLY.
 
Methods inherited from class com.webmbt.plugin.PluginAncestor
addException, close, getCurScript, getData, getData, getDataMgr, getDataSetRowNum, getInitParams, getMethodList, getMScriptAPI, getMScriptMethodList, getNativeMethod, getNativePluginObj, getPathVar, getPluginID, getScriptExecutor, getVar, initialize, isError, isReady, next, registerVarChangeListener, replaceEscapeChar, rewind, setData, setPathVar, setReady, setVar, snapScreen, snapScreen, start, uiLocatorMap, waitForPageToLoad
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webmbt.plugin.MScriptMethodIntf
click, click, click, containsText, count, doubleClick, dragAndDrop, getAlertText, getAttr, getConfirmText, getCookie, getText, getTitle, getValue, isAlertPresent, isChecked, isConfirmPresent, isDisabled, isPresent, isVisible, js, mouseDown, mouseOver, mouseUp, refresh, rightClick, selectFrame, selectOption, selectWindow, setCheckBox, setRadioButton, setupAlert, setupConfirmResponse, sizeOf, snapScreen, type, type, typeKey, waitForCondition, waitForPageToLoad, webAuth
 

Constructor Detail

WebPluginAncestor

public WebPluginAncestor()
Method Detail

openURL

public abstract void openURL(java.lang.String url_p)
                      throws java.lang.Exception
opens the url passed in and set it to be current page.

Throws:
java.lang.Exception

convertKeyString

public static java.lang.String convertKeyString(java.lang.String keyString_p)

setBrowserCmd

public abstract void setBrowserCmd(java.lang.String browserCmd_p)
changes the browser before the MBT execution is started. This command should only be called in MBT_start trigger in order to be effective. You can set the browserCmd to a value from a data set to run each virtual user with different browser.

For example, you can use $nextDataSetRow(java.lang.String dataSetID_p, java.lang.String floatIdx_p), $rand(), and $getData('ds','field') to retrieve different browser "cmd" from a file/spreadsheet to achieve testing with virtual users with each running different browser, like
<action code="$nextDataSetRow('myDS', '$rand()')"/>
<action code="$setBrowserCmd('$getData('myDS', 'myField')')"/>

Parameters:
browserCmd_p - iexplore, firefox for both HtmlUnit and Selenium. For Selenium you may use additional browser ids as documented in setBrowserCmd in SeleniumPlugin class including custom browser.

setInitParams

public void setInitParams(java.lang.String[] paramList_p)
                   throws java.lang.Exception
Description copied from class: PluginAncestor
INTERNAL USE ONLY.

Overrides:
setInitParams in class PluginAncestor
Throws:
java.lang.Exception


Copyright © 2008. All Rights Reserved.