Check that image is loaded

JS-step fails after running more than 15s.

view raw        js-step_checkimage.js        hosted with ❤ by GitHub      

view raw        js-step_forcelinksopentosamewindow.js        hosted with ❤ by GitHub      

Select random date range with a Datepicker and a Timepicker

view raw        js-step_setdatepicker.js        hosted with ❤ by GitHub      

Set text for an HTML element

view raw        js-step_settext.js        hosted with ❤ by GitHub      

Wait for HTML #element to disappear

JS-step fails after running more than 15s.

view raw        js-step_waitforelementtodisappear.js        hosted with ❤ by GitHub
     

Parameterizable poll to make sure an element is not visible

JS-step can be configured from another JS-step. Use case example: create a trace which has only this JS-step. Then, in other traces you can reuse this JS-step multiple times by setting the parameters before calling the trace.

view raw        js-step_param_poll_not_showing.js        hosted with ❤ by GitHub      

    

Parameterizable file download

JS-step can be configured from another JS-step.

view raw        js-step_param_file_download.js        hosted with ❤ by GitHub    

    

Load jQuery

External scripts need to be loaded in the same step they are used.

view raw        js-step_load_jquery.js        hosted with ❤ by GitHub      

    

Check that the URL contains something        

view raw        js-step_checkurl.js        hosted with ❤ by GitHub      

    

When having multiple links with same content click the first match.

view raw        js-step_click_first_match.js        hosted with ❤ by GitHub      

    

Communicate to external server

Talking to a REST API.This example shows how data can be send from a trace to an http server in any domain.GLOBALS.saveData is posted to an external server.

view raw        js-step_send_json.js        hosted with ❤ by GitHub      

Here’s a Node.JS example of the server that receives the data (GLOBALS.saveData), and saves it into a file. This not a JS-step, but an example Node.JS server you can host to receive data from your traces.

view raw        node-saveData-http.js        hosted with ❤ by GitHub      

Did this answer your question?