Handling the Capcha in Selenium

  Automation Testing

Email

@Test public void loginTest() throws InterruptedException {     System.out.println("Testing");     driver.get("https://customer.onlinelic.in/ForgotPwd.htm");     WebElement element = driver.findElement(By.xpath("//*[@id='forgotPassword']/table/tbody/tr[5]/td[3]/img"));     System.out.println(" get the instance ");     String elementTest = element.getAttribute("src");     System.out.println("Element : " + elementTest); }
Spread the Code

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of