Browser
(→Functions) |
|||
(9 intermediate revisions by one user not shown) | |||
Line 14: | Line 14: | ||
====allowPlugins==== | ====allowPlugins==== | ||
====width==== | ====width==== | ||
− | This will tell you the current browser width | + | This will tell you the current browser width. |
====height==== | ====height==== | ||
− | This will tell you the current browser height | + | This will tell you the current browser height. |
====downloadedFile==== | ====downloadedFile==== | ||
− | The temporary file path of a file after being downloaded via a file download dialog | + | The temporary file path of a file after being downloaded via a file download dialog. |
====proxy==== | ====proxy==== | ||
====referrer==== | ====referrer==== | ||
− | |||
− | |||
==Events== | ==Events== | ||
====cursorChanged==== | ====cursorChanged==== | ||
− | |||
====domBecameReady==== | ====domBecameReady==== | ||
− | |||
====finishedLoading==== | ====finishedLoading==== | ||
− | |||
====viewScrolled==== | ====viewScrolled==== | ||
− | |||
====urlUpdated==== | ====urlUpdated==== | ||
− | |||
====beganLoading==== | ====beganLoading==== | ||
==Functions== | ==Functions== | ||
+ | |||
===Basic Browser Controls:=== | ===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==== |
Latest revision as of 17:12, 10 January 2016
This fixture allows for interaction with the main browser.
[edit] Properties
[edit] IsDomReady
Returns a boolean determining whether the dom is ready to be modified.
[edit] url
[edit] userAgent
[edit] visible
[edit] allowCss
[edit] allowImages
[edit] allowJavascript
[edit] allowPlugins
[edit] width
This will tell you the current browser width.
[edit] height
This will tell you the current browser height.
[edit] downloadedFile
The temporary file path of a file after being downloaded via a file download dialog.
[edit] proxy
[edit] referrer
[edit] Events
[edit] cursorChanged
[edit] domBecameReady
[edit] finishedLoading
[edit] viewScrolled
[edit] urlUpdated
[edit] beganLoading
[edit] Functions
[edit] Basic Browser Controls:
[edit]
(url as String)
[edit] cut
[edit]
[edit] undo
[edit] paste
[edit] delete
[edit] forward
[edit] refresh
[edit] zoom
not currently functional
[edit] copy
[edit] selectAll
[edit] back
[edit] unfocus
tells the browser it’s been unfocused
[edit] focus
tells the browser it’s been focused
[edit] Low Level Access Functions For Existing UBot Commands:
[edit] getChosenImage
gets the chosen element image as a BitMap
[edit] clearCookies
[edit] typeText (text As String, keyEvent As String)
keyEvent can be:
- Standard
- Key Down
- Key Up
- Key Press
- Flash Plugin
[edit] allowPopups
- Yes
- In New Window
- No
[edit] closePage
[edit] resetHeaders
[edit] setProxyCredentials
(username As String, password As String)
[edit] setReferrer
(value As String)
[edit] setVisible
(value As Boolean)
[edit] setWebsiteCredentials
(username As String, password As String)
[edit] loadHtml
(html As String)
[edit] runJavascript
(javascript As String)
[edit] setAllowCss
(value As Boolean)
[edit] setAllowImages
(value As Boolean)
[edit] eval
(javascript As String) returns a string if the eval return an object, this will return a JSON string representing the object
[edit] setAllowJavascript
(value As Boolean)
[edit] setAllowPopups
(value As Boolean)
[edit] setHeader
(name As String, value As String)
[edit] getDownloadedFile
[edit] getFullBrowserImage
gets the current browser image as a BitMap
[edit] changeUserAgent
(userAgent As String)
[edit] Low level Helper Functions:
[edit] setLogLevel (level As String)
off on
[edit] 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
[edit] downloadData
using the current browser session, this downloads a file as a byte array
[edit] getContentSize
returns a Drawing.Point with the current browser size.
[edit] Process Control:
[edit] kill
kills the connected browser process
[edit] resetBrowser
restarts the connected browser process
[edit] Input Controls:
[edit] keyDown
virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)
[edit] keyUp
(virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)
[edit] keypress
(character as Char)
[edit] keypress
(virtualKey As Integer, Optional shiftPressed As Boolean = False, Optional controlPressed As Boolean = False, Optional altPressed As Boolean = False, Optional metaPressed As Boolean = False)
[edit] mouseUp
(button As Integer)
[edit] mouseDown
(button As Integer)
[edit] mouseMove
(x As Double, y As Double)
[edit] mouseOver
(x As Double, y As Double)
[edit] mouseWheel
(delta As Integer)
[edit] click
(useLocation As Boolean, timeout As TimeSpan)