Next-Gen App & Browser
Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How do I locate elements on a web page and interact with them?

Before performing any interactions on the elements on the web page, the first step is to locate the elements. For demonstration, we will locate elements on Walmart landing page.

Following are the steps to locate elements on the web page.

  • Open your website, right-click on the page (or press F12), and select Inspect.
  • How do I locate elements on a web page and interact with them
  • It will launch Developer tools. On the left side, there is a mouse icon you can use to inspect elements. Upon hovering over it, a message titled Select an element in the page to inspect it will appear.
  • How do I locate elements on a web page and interact with them
  • Navigate and click on the element you wish to locate. Once you click on the element, the DOM will highlight that particular element.
  • How do I locate elements on a web page and interact with them

    For example, the highlighted element on the web page is shown below.


    img {<button class="w_hhLG w_XK4d w_jDfj" type="button">
    Give feedback</button>}

    You can now use the button tag and link text Give feedback to locate the desired element on the web page.

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...
ShadowLT Logo

Start your journey with LambdaTest

Get 100 minutes of automation test minutes FREE!!

Signup for free