Zabs
Zabs

Reputation: 14142

Captcha with Selenium IDE - can I do a 'pause' and ask the 'user' to enter the CAPTCA

I am using Selenium IDE with my Firefox browser extension, it works pretty well but I have a registration form that uses an CAPTCHA - obviously it is impossible to get the Selenium to 'read' the CAPTCHA (that would make it somewhat useless if it did) - but I need to amend my test to alert the user that they should add the CAPTCA they see on the screen within x seconds.

I have no idea if this is possible - any advice appreciated.

Upvotes: 0

Views: 755

Answers (1)

Abdul Hameed
Abdul Hameed

Reputation: 1145

Yes this is possible to alert user to enter the Captcha value. Please use below command in Selenium IDE.

Command: storeEval
Target: prompt("Enter Captcha Value")
Value: var

This prompts you to enter the Captcha value. You can see the Captcha and then enters it. This prompted value is stored in var. I then use as entering in Captcha field.

Command: type
Target: your captcha location
Value: ${var} 

There is also another way where you can skip this section if there is no Captcha. Please refer this link. You need to add the user extension js file to your Selenium IDE and then use gotoIf function. Eg: Refer my script here. This will only prompt user to enter the Captcha if that element present.

Upvotes: 2

Related Questions