Objective
The objective of this practice problem is for the user to demonstrate an understanding of the Basic Web Browser commands discussed in the previous sections by creating an automation that utilizes said commands. The commands covered in the previous section were the Selenium Create Browser, Selenium Navigate to URL, Selenium Navigate Back, Selenium Navigate Forward, Selenium Refresh, & Selenium Close Browser Application. In the future, these commands may be implemented into other practice problems.
Scenario
An employee of the ABC company is in the process of navigating to the Yahoo Finance website and refreshing the main page.
Prerequisites
There are no prerequisites necessary for this exercise.
Practice Problem Requirements
The user must create an automation that performs the following tasks:
  • Create a Web Browser Instance (Google Chrome)
  • Navigate to the Yahoo Finance URL. This can be done using the Create Web Browser Command or Navigate to URL Command
  • Refresh the web page
  • Close the Chrome Browser

Problem Difficulty: Easy
Solution will be provided on the next page with a brief explanation.

Solution
The code for the solution has been provided below.

Step 1: The Selenium Create Chrome Browser command is used in this exercise to create an instance of a Chrome Browser to access the internet.

Step 2: The Selenium Navigate to URL command is used to access the Yahoo Finance website.

Step 3: The Selenium Refresh command is used to refresh the Chrome Browser with the Yahoo Finance website.

Step 4: Finally, the Selenium Close Browser command is used to close the Chrome Browser.

Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.

Contact Sales
Call Our Experts!