http://educate.quasimatic.com/installation/setting-up-selenium
http://educate.quasimatic.com/selenium/glance-from-scratch
Determine log level :
error, warning, debug, info, trace
Navigate to specified URL
End the session and close the browser
Find the element(s) given selector
Replace element text with specified text
Click element
Double click element
Middle click element
Right click element
Press mouse button
Lift mouse button
Move mouse to center of element. optional - X,Y offsets from the top left corner of element
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
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.
Wait for a change to previously saved selector's results
Return the values from previously used save
Execute browserside javascript
Execute browserside javascript Asynchroniously
Add a pause in milliseconds
Save a screenshot of the browser to the filename given
example: saveScreenshot("/screenshot/mypic.jpg")
Scroll to make element visible on screen
Wait for the given element to appear
Get the given selector value
Set the value of current selector
Use Json to set state for multiple elements on page. multiple gets, example:
.cast({
'username': "myuser",
'password': "mypass"
})
These are added to end of selector to project the results.
- browser:url
- return the current URL
- browser:title
- return the page's current title
- :text
- return the elements innertext
- :html
- return the elements outerHTML
- :value
- return the elements value
- :attribute-<attribute name$gt;
- return the specified attribute value
- :count
- returns a count of the elements
These options are added to end of a Glance label to allow us to change how the object is found or filtered
- #attribute-<attribute name>
- limit the search to the specified attribute name
Example Code: https://codepen.io/quasimatic/pen/zwQVEL - #class
- limit the selector to class attribute
Example Code: https://codepen.io/quasimatic/pen/OmebeK - #closest
- visibly closest element to the scope
Example Code: https://codepen.io/quasimatic/pen/YVoEYo - #contains-text
- selector given can be part of a longer text string
Example Code: https://codepen.io/quasimatic/pen/bWPwjK - #css
- applies selector as a css query
Example Code: http://codepen.io/quasimatic/pen/xdJKJP - #exact-text
- find only elements that are an exact textual match
Example Code: https://codepen.io/quasimatic/pen/qmzVJv - #hidden
- limit the search to hidden elements
- #id
- limit the search to the specified id (fastest way to search)
- #<index>
- return element number <index>
Example Code: https://codepen.io/quasimatic/pen/BROxEm - #node-type
- look only for elements that match this node-type
Example Code: https://codepen.io/quasimatic/pen/rmEWQy - #value
- look for the selector in the value attribute
- #visible
- default behavior - return only visible elements
Example Code: https://codepen.io/quasimatic/pen/MmqGGq