RE: how to check the two condition to captcha. First,captcha is blank and second,captcha take the wrong captcha value. How to check captcha if or elseif condition. So please give me a Answer.

If any one solve this problem. So submit this answer.

sumit Default Asked on November 11, 2014 in Selenium WebDriver.
Add Comment
2 Answers

If you’re sure that you can get hold of the captcha, then you can try the below code.

String captcha=”xxxx”
if(driver.findElement(By.xpath(your captcha webelement1).contains(“”)
&&(driver.findElementByxpath(your captcha webelement2).contains(captcha)){
do this
}
else{
do this
}

Doctor Answered on November 11, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.