Learning Wolfram: Interacting With Web Browsers

Learning Wolfram: Interacting With Web Browsers

When I worked in Quality Assurance, one of my jobs was to do regression testing on a number of websites. At that time there were only limited automation tools, so my solution involved the Java Robot class to issue mouse and key events. This was of course incredibly fragile.

When I worked in Quality Assurance, one of my jobs was to do regression testing on a number of websites. At that time there were only limited automation tools, so my solution involved the Java Robot class to issue mouse and key events. This was of course incredibly fragile.

More recently, automating web browser interactions have become much easier. The WebDriver protocol specifies a really nice set of commands and interactions to talk to a browser. The Wolfram Language (WL) uses this protocol to let you control browsers directly from a notebook session. The interactive nature of a notebook is extremely nice to incrementally develop web automation workflow. In this story, I will show you how to get started with this functionality.

To start a new web browser session, you use the StartWebSession command. Without function arguments, it will start a Chrome browser on your computer. The Firefox browser is also supported.

Image for post

(image by author)

To open a web page you can use the WebExecute command. This command is the main function you use to control the web browser. You specify the session and you give it a command like “OpenWebPage”, “ClickElement”, or “JavascriptExecute”:

quality-assurance programming web-testing wolfram webdriver

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Mutation Testing Systems: Improving the Quality of Tests

See why mutation testing might be the answer for better quality tests and thus higher quality code.

Where To Learn Test Programming — July 2020 Edition

What do you do when you have lots of free time on your hands? Why not learn test programming strategies and approaches?

Explaining the Difference Between Web and Mobile App Testing

The functionality of mobile and web version of an app is almost identical, but the app QA process isn't. So what's the same and what's different?

Assuring or Not Assuring Quality?

Assuring or Not Assuring quality? Continuous testing, continu...

How to Do API Testing?

API endpoint when you send the get request to that URL it returns the JSON response. In this article, I am going to use postman assertions for all the examples since it is the most popular tool. But this article is not intended only for the postman tool.