0

There are links like this on a web page:

  • Overview
  • General Settings
  • AR Server Settings
  • Cache Settings
  • Report Settings
  • Web Service Settings
  • Log Settings
  • Change Password

I am writing an automation script in selenium under Java eclipse and want to click on Cache Settings option. Can some one help? I know this would be simple, but i am a newbie in this world.i am able to automate previous steps til coming to this web page and now stuck in clicking Cache settings.

HTML snippet:

<div class="textMainNav">Cache Settings </div> 
<div class="textMainNav">Report Settings </div>

I have tried few things but none working.

Guy
  • 46,488
  • 10
  • 44
  • 88

1 Answers1

2

To click on the links you can use either of the following solutons:

  • Click on Overview:

    • xpath:

      driver.findElement(By.xpath("//div[@class='textMainNav' and normalize-space()='Overview']")).click();
      
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352