public final class WebDriverPlugin extends PluginAncestor
WebDriver plugin provides the capability to test windows UI applications through Seelnium/WebDriver. You may use any driver that immplements RemoteWebDriver wire protocol, this includes Winium Winium, WinAppDriver Info. You must install the appropriate driver server component either on the local computer or on a remote computer and have the server started before running your model using this plugin. Here is the example script that uses this plugin:
import org.openqa.selenium.winium.DesktopOptions; import org.openqa.selenium.winium.WiniumDriver; In MBT_START trigger: DesktopOptions options = new DesktopOptions(); options.setApplicationPath("C:\\Windows\\System32\\calc.exe"); WebDriver wd = new WiniumDriver(new URL("http://localhost:9999"), options); $WEBDRIVER.setWebDriver (wd); In state/trans trigger: $WEBDRIVER.getWebDriver().findElement(By.id("num8Button")).click();
MScriptInterface.IGNORE_INHERITED_METHOD, MScriptInterface.NOT_MSCRIPT_METHOD, MScriptInterface.TO_PLUGIN
Constructor and Description |
---|
WebDriverPlugin() |
Modifier and Type | Method and Description |
---|---|
WebDriverAssist |
assist()
returns the helper class that contains helper functions for more complex ui operations.
|
void |
close()
INTERNAL USE ONLY
|
String |
getPluginDesc() |
String |
getPluginID() |
org.openqa.selenium.remote.RemoteWebDriver |
getWebDriver()
returns the web driver object which is used to interact with AUT.
|
void |
initialize(MbtScriptExecutor scriptExec_p)
INTERNAL USE ONLY
|
void |
setWebDriver(org.openqa.selenium.remote.RemoteWebDriver webDriver_p)
sets the remote web driver object to be used for interacting with AUT
through RemoteWebDriver.
|
void |
start()
INTERNAL USE ONLY
|
enterInitialState, exitFinalState
public void close()
INTERNAL USE ONLY
close
in class PluginAncestor
public void initialize(MbtScriptExecutor scriptExec_p)
INTERNAL USE ONLY
public void setWebDriver(org.openqa.selenium.remote.RemoteWebDriver webDriver_p)
webDriver_p
- public void start() throws Exception
INTERNAL USE ONLY
start
in class PluginAncestor
Exception
public String getPluginID()
getPluginID
in class PluginAncestor
public String getPluginDesc()
getPluginDesc
in class PluginAncestor
public org.openqa.selenium.remote.RemoteWebDriver getWebDriver()
public WebDriverAssist assist()
Copyright TestOptimal, LLC