Unable to find the element within frame



  • i cant click the menu named biometric check list. there's total five frames and i started to read it from first index. getting unable to locate an element error. What might be the reason any idea.

         driver.switchTo().frame(1).findElement(By.xpath("//div[@class='menu'//li[@id='biometricCheckList'//a[@title='biometric Check List']")).click();
    

    enter image description here



  • Indexes start at 0, I think you have to chain .frame(0).switchTo().frame(0) until you get to 5. Or do seperate calls five times.

    if this is a new application in development, please tell the developers that framesets are depricated and should not be used anymore.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2