← Back to Course

Opening a Browser & Navigating to URLs

Launching a Browser Session

The first real action in almost every Selenium script is creating a browser instance. This single line of code launches an actual browser window that Selenium will control for the remainder of the script.

Navigating to a URL

Once the browser is open, Selenium provides simple commands to load a specific web page. This is typically done through a 'get' method that takes the full URL as its argument and waits for the page to begin loading.

Handling Page Load Timing

Wait TypePurpose
Implicit WaitApplies a default wait time across all element lookups
Explicit WaitWaits for a specific condition, like an element becoming visible
Fluent WaitPolls repeatedly with custom intervals until a condition is met

Dealing with Redirects

Some URLs automatically redirect to another page after loading. Selenium handles this transparently in most cases, but it's good practice to verify the final URL matches what you expect before continuing with further actions.

Once you can reliably open browsers and load pages, the next step is learning to manage multiple windows, tabs, and navigation actions during a test.

Ready to master Selenium Training Course?

Join Uncodemy's hands-on training and build real automation skills with expert mentors.

Explore Course