Automatic testing (control WBT via script)

Feb 08, 2022

Dear community,

I have a tricky challenge that you guys might be able to help me with directly or give me a tip: We (my company) want to automatically test our WBTs. For example, by uploading the WBT to be tested to a test instance of our LMS and letting different virtual machines access it and "click" through the training.

However, since the trainings always vary a bit (e.g. the "next" button is sometimes somewhere else), we don't know how to accomplish this. So my question to you is: do you know of a way  to run WBTs via script? Other questions that came to mind were:
- Is there a way to tag buttons with some sort of tag/unique identifier so that a script can read them?
- Is there an API (e.g. based on javascript) that we can use?
- Is there a format we can export our WBTs to that will help us?
- Do you know of similar projects/projects that could help us?

Many thanks and greetings from Cologne

1 Reply
Josh Dean

This is a novel idea. One thing that could be challenging to account for is if and when text overflow occurs or if objects overlap. This is visually easy to recognize but harder programmatically. 

However, you might be able try some things in this direction using the elements in the DOM that have "aria" attributes. Articulate seems to have made many efforts to ensure the accessibility of their storyline and rise courses. Accessibility usually includes access to courses via the keyboard as well as described actions. Aria attributes are associated with actionable items in a course to describe to screen readers what the button or action does. You could tap into these aria-labels and write it to a file to find patterns for your testing or depending on those labels you could click on the action.

I tried this by pulling up the developer tools while pressing the keyboard tab key and cycled through actionable items in a course. You could publish a course or series of courses and perhaps point a python script at it with selenium and export everything aria related in a course to see what you get to accomplish your puzzle.