Member-only story

Drive Google Map Address validation with Selenium WebDriver

How to use Selenium WebDriver to select and validate a Google Map address

Zhimin Zhan
3 min readMar 19, 2023

A repost of my daughter’s article, I added a few notes. This is also included in my “How to in Selenium WebDriver” series.

Integrating Google Maps to validate an address is a common feature on web pages. This article shows how to automate that in raw Selenium WebDriver.

Table of Contents:
·
Test Design
Execution (Video)
·
Test Script:
Refinement
Refactoring
·
Zhimin’s Notes

Test Design:

Quite straightforward.

  1. Find the address text field element, and clear it first.
    In case it was not empty.
  2. Typing in the new address to the element.
    Don’t need to be the full address, as Google maps will try to auto-complete it.
  3. Send down keys (to the same element) repeatedly until the desired entry is highlighted.
    Add a minor

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

No responses yet