glance-webdriver v0.8.7
For a step by step guide to setting up selenium:
http://educate.quasimatic.com/installation/setting-up-selenium
For a guide to run your first selenium glance script:
http://educate.quasimatic.com/selenium/glance-from-scratch
Methods
setLogLevel(level)
Determine log level :
error, warning, debug, info, trace
url(address):
Navigate to specified URL
end():
End the session and close the browser
find(selector):
Find the element(s) given selector
type(text)
Replace element text with specified text
click(selector) :
Click element
doubleClick(selector)
Double click element
middleClick(selector)
Middle click element
rightClick(selector)
Right click element
mouseDown()
Press mouse button
mouseUp()
Lift mouse button
moveMouseTo(selector, xOffset, yOffset)
Move mouse to center of element. optional - X,Y offsets from the top left corner of element
dragAndDrop(sourceSelector, targetSelector, xOffset, yOffset)
Drag the specified source element to the center of the specified target element.
optional - X,Y offsets from the top left corner of target element
save(selector)
Performs a get on the specified selector and keeps the results in memory
(results will vary depending on selector and projection use)
example usage: save the number of items in a grid, so we can compare to after a new item is added.
waitForChange(selector)
Wait for a change to previously saved selector's results
getHistory(selector)
Return the values from previously used save
execute(func, ...args)
Execute browserside javascript
executeAsync(func, ...args)
Execute browserside javascript Asynchroniously
pause(delay)
Add a pause in milliseconds
saveScreenshot(filename)
Save a screenshot of the browser to the filename given
example: saveScreenshot("/screenshot/mypic.jpg")
scroll(selector)
Scroll to make element visible on screen
waitFor(selector)
Wait for the given element to appear
Getting and setting values
get(selector)
Get the given selector value
set(selector, value)
Set the value of current selector
cast(state)
Use Json to set state for multiple elements on page. multiple gets, example:
.cast({
'username': "myuser",
'password': "mypass"
})
Special projections:
These are added to end of selector to project the results.
Options:
These options are added to end of a Glance label to allow us to change how the object is found or filtered
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago