com.appperfect.devcommon.script.webelement
Interface WebBrowserElement

All Superinterfaces:
IScript, WebObject

public interface WebBrowserElement
extends WebObject

To fire any event on a WebBrowser one need to create WebBrowserElement. WebBrowserElement element can be created using createWebBrowserElement API of IScriptEngine interface. The return value is an instance of WebBrowserElement interface Once WebBrowserElement is created, you can play events on it.


Method Summary
 boolean activate()
 To activate or bring browser to focus
 boolean alert(java.lang.String message)
 To replay alert javascript in case of Mozilla Browser Control
 boolean back()
 To move to previous page in the WebBrowser
 boolean close()
 To close WebBrowser
 boolean confirm(java.lang.String message, boolean cancel)
 To replay confirm dialog javascript in case of Mozilla Browser Control
 boolean forward()
 To move to next page in the WebBrowser
 boolean home()
 To move to home page in the WebBrowser
 boolean maximize()
 To maximize browser
 boolean minimize()
 To minimise browser to an icon
 boolean prompt(java.lang.String message, java.lang.String userInput)
 To replay prompt javascript in case of Mozilla Browser Control
 boolean refresh()
 To refresh page in the WebBrowser
 boolean restore()
 To restore browser to previous size
 
Methods inherited from interface com.appperfect.devcommon.script.webelement.WebObject
addAttribute, click, dblClick, mouseMove, rightClick, set, setBreakPoint, setExactMatchForAttributesComparision, setIgnored, setImagePath, setThinkTime, setTitle, submit, type, wait
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setTimeout
 

Method Detail

activate

boolean activate()
To activate or bring browser to focus

Returns:
true if success, false otherwise

alert

boolean alert(java.lang.String message)
To replay alert javascript in case of Mozilla Browser Control

Parameters:
message - alert message
Returns:
true if success, false otherwise

back

boolean back()
To move to previous page in the WebBrowser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

close

boolean close()
To close WebBrowser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

confirm

boolean confirm(java.lang.String message,
                boolean cancel)
To replay confirm dialog javascript in case of Mozilla Browser Control

Parameters:
message - confirm message
cancel - if dialog was cancelled
Returns:
true if success, false otherwise

forward

boolean forward()
To move to next page in the WebBrowser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

home

boolean home()
To move to home page in the WebBrowser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

maximize

boolean maximize()
To maximize browser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

minimize

boolean minimize()
To minimise browser to an icon

Returns:
true if success, false otherwise

prompt

boolean prompt(java.lang.String message,
               java.lang.String userInput)
To replay prompt javascript in case of Mozilla Browser Control

Parameters:
message - prompt message
userInput - input by user
Returns:
true if success, false otherwise

refresh

boolean refresh()
To refresh page in the WebBrowser

Returns:
true if event was executed successfully, returns false if there is any failure during execution

restore

boolean restore()
To restore browser to previous size

Returns:
true if success, false otherwise


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.