How to click a href link using Selenium

前端 未结 10 1243
悲哀的现实
悲哀的现实 2020-12-09 09:48

I have a html href link

App Configuration

using Selenium I need

10条回答
  •  清歌不尽
    2020-12-09 10:41

     webDriver.findElement(By.xpath("//a[@href='/docs/configuration']")).click();
    

    The above line works fine. Please remove the space after href.

    Is that element is visible in the page, if the element is not visible please scroll down the page then perform click action.

提交回复
热议问题