Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

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.

LambdaTest

Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing
LambdaTest

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More
LambdaTest

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS

Support

24/7 support

Security

Enterprise grade security

Cloud

Fastest test execution cloud