Browser

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 77: Line 77:
 
====resetHeaders====
 
====resetHeaders====
 
====setProxyCredentials====
 
====setProxyCredentials====
*''(username As String, password As String)
+
''(username As String, password As String)
 
====setReferrer====
 
====setReferrer====
*''(value As String)
+
''(value As String)
 
====setVisible====
 
====setVisible====
*''(value As Boolean)
+
''(value As Boolean)
 
====setWebsiteCredentials====
 
====setWebsiteCredentials====
*''(username As String, password As String)
+
''(username As String, password As String)
 
====loadHtml====  
 
====loadHtml====  
*''(html As String)
+
''(html As String)
 
====runJavascript====  
 
====runJavascript====  
*''(javascript As String)
+
''(javascript As String)
 
====setAllowCss====
 
====setAllowCss====
*''(value As Boolean)
+
''(value As Boolean)
 
====setAllowImages====
 
====setAllowImages====
*''(value As Boolean)
+
''(value As Boolean)
 
====eval====
 
====eval====
*''(javascript As String)
+
''(javascript As String)
 
returns a string
 
returns a string
 
if the eval return an object, this will return a JSON string representing the object
 
if the eval return an object, this will return a JSON string representing the object
 
====setAllowJavascript====
 
====setAllowJavascript====
*''(value As Boolean)
+
''(value As Boolean)
 
====setAllowPopups====
 
====setAllowPopups====
*''(value As Boolean)
+
''(value As Boolean)
 
====setHeader====
 
====setHeader====
*''(name As String, value As String)
+
''(name As String, value As String)
 
====getDownloadedFile====
 
====getDownloadedFile====
 
====getFullBrowserImage====
 
====getFullBrowserImage====
 
gets the current browser image as a BitMap
 
gets the current browser image as a BitMap
 
====changeUserAgent====  
 
====changeUserAgent====  
*''(userAgent As String)
+
''(userAgent As String)
  
 
===Basic Browser Controls:===
 
  
 
===Low level Helper Functions:===
 
===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:===
 
===Process Control:===
 +
====kill====
 +
''kills the connected browser process
 +
====resetBrowser====
 +
''restarts the connected browser process
 +
  
 
===Input Controls:===
 
===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:===
 
===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.


Contents

[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] navigate

(url as String)

[edit] cut

[edit] stopNavigation

[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)


[edit] Wait Functions:

[edit] waitForBeganLoading

[edit] waitForBrowserReady

[edit] waitForContentsFinishedLoading

[edit] waitForDomReady

[edit] waitForDownloadAvailable

[edit] waitForDownloadComplete

[edit] waitForFinishedLoading

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox