Browser

From UBot Studio
Jump to: navigation, search

This fixture allows for interaction with the main browser.


Contents

Properties

IsDomReady

Returns a boolean determining whether the dom is ready to be modified.

url

userAgent

visible

allowCss

allowImages

allowJavascript

allowPlugins

width

This will tell you the current browser width.

height

This will tell you the current browser height.

downloadedFile

The temporary file path of a file after being downloaded via a file download dialog.

proxy

referrer

Events

cursorChanged

domBecameReady

finishedLoading

viewScrolled

urlUpdated

beganLoading

Functions

Basic Browser Controls:

navigate

(url as String)

cut

stopNavigation

undo

paste

delete

forward

refresh

zoom

not currently functional

copy

selectAll

back

unfocus

tells the browser it’s been unfocused

focus

tells the browser it’s been focused


Low Level Access Functions For Existing UBot Commands:

getChosenImage

gets the chosen element image as a BitMap

clearCookies

typeText (text As String, keyEvent As String)

keyEvent can be:

  • Standard
  • Key Down
  • Key Up
  • Key Press
  • Flash Plugin

allowPopups

  • Yes
  • In New Window
  • No

closePage

resetHeaders

setProxyCredentials

(username As String, password As String)

setReferrer

(value As String)

setVisible

(value As Boolean)

setWebsiteCredentials

(username As String, password As String)

loadHtml

(html As String)

runJavascript

(javascript As String)

setAllowCss

(value As Boolean)

setAllowImages

(value As Boolean)

eval

(javascript As String) returns a string if the eval return an object, this will return a JSON string representing the object

setAllowJavascript

(value As Boolean)

setAllowPopups

(value As Boolean)

setHeader

(name As String, value As String)

getDownloadedFile

getFullBrowserImage

gets the current browser image as a BitMap

changeUserAgent

(userAgent As String)


Low level Helper Functions:

setLogLevel (level As String)

off on

choose (elementSelector As Object)

this function should be used when making a new command the element parameter editor will provide the elementSelector needed for this function this function returns an integer representing how many elements were found

downloadData

using the current browser session, this downloads a file as a byte array

getContentSize

returns a Drawing.Point with the current browser size.


Process Control:

kill

kills the connected browser process

resetBrowser

restarts the connected browser process


Input Controls:

keyDown

virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)

keyUp

(virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)

keypress

(character as Char)

keypress

(virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)

mouseUp

(button As Integer)

mouseDown

(button As Integer)

mouseMove

(x As Double, y As Double)

mouseOver

(x As Double, y As Double)

mouseWheel

(delta As Integer)

click

(useLocation As Boolean, timeout As TimeSpan)


Wait Functions:

waitForBeganLoading

waitForBrowserReady

waitForContentsFinishedLoading

waitForDomReady

waitForDownloadAvailable

waitForDownloadComplete

waitForFinishedLoading

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox