I am utilizing the Selenium WebDriver and Ruby to execute some mechanization and I went in to a issue of a captcha around measure 3 of a 5 step procedure.
I am tossing all the computerization in a rake software therefore I am questioning is there a control to stop or rest the software working briefly till I input information in to the captcha then keep on working on another page.
1). Because you happen to be creating the evaluation in a software, whatever you must do is include a slumber in your evaluation i.e. ‘slumber 100’ for instance.
Nevertheless, it’s terrible to include arbitrary rests in evaluations. You can even make a move like “await name ‘foo'” where ‘foo’ is the name of the site in-Step 4. It does not have to be name, it can be such a thing, but you get the concept. Delay for something semantic which suggests that measure 3 is done and measure 4 is prepared to begin.
By doing this, its more specific delay.
2). It has been implemented in Java, but related technique. Your alternative can be identified here.
3). To develop on selenium newbie’s solution and presuming you have access to the games console the software is working on:
print "Enter Captcha" captchaTxt = gets.chomp yourCaptchaInputWebdriverElement.send_keys captchaTxtIf you simply need to stop and enter the captcha in your browser, it is possible to only have it fast at the console to do this very point and it will only sit there.
print "Enter the captcha in your browser" getsYou can also establish the implied delay to reasonably long time period to ensure Selenium S/W would automatically notice another site and transfer. Nevertheless, this might make the significant Captcha measure (for recording / procedures benefit) away of your evaluation until you're fairly rectal with your remarking. Because this can be an earnestly engaging evaluation needing user input I 'd state that creating the examiner media "enter" to the games console is the approach to take.