18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to run external program

jonassunduisjonassunduis Members
edited November -1 in Sahi - Open Source
Hello,
sorry everybody if my question will not be very proffesional - i'm very new to all this.

I'm making a test for the site with captcha. I have account on deathbycapture where i got the program to upload img and then i get output to txt file. Please answer my questions on howto:

1 download the captcha image and pass it to external program (run the program with the img as parameter);
2 get the parameter from file and upload as an answer into captcha field.

Thank you very much!

Comments

  • globalwormingglobalworming Moderators
    edited March 2012
    Hi

    if you are useing death by capture, I assume you have other means of automating browser actions. How comes you have chosen Sahi?

    To answer your question, you can use batch or shell scripts with the _execute API, but I'm not sure if DBC supports that.

    For downloading the image look into this http://sahi.co.in/w/handle-file-downloads http://sahi.co.in/forums/viewtopic.php?id=2881 http://sahi.co.in/forums/viewtopic.php?id=2476 http://sahi.co.in/forums/viewtopic.php?id=2488

    Could you please provide a link to some kind of DBC documentation?

    Regards
    Wormi
  • Hello,
    first of all thank you for the answer! The DBC I use because the site i'm trying to automate is using captcha's and i can't switch it off, but i need to do the job. I have tried different automation programs, bet i liked sahi most because of the fact it's on java - browser independent. And because it forks where selenium didn't.

    The DBC documentation could be found on web deathbycaptcha.com/user/api
    There's JAVA Common Clients Interface or there's their own command line tool, which is used this way:
    How to use our command-line tool
    To check your balance, run:
    dbcclient.exe -l USERNAME -p PASSWORD -b
    Your balance will be saved in balance.txt file and printed out on the standard output.
    To upload a CAPTCHA, run:
    dbcclient.exe -l USERNAME -p PASSWORD -c CAPTCHA_FILE_NAME [-t TIMEOUT]
    Default CAPTCHA solving timeout is 60 seconds.
    If solved, the CAPTCHA ID will be saved in id.txt, the CAPTCHA text will be saved in answer.txt, and both ID and text will be printed out on the standard output separated by a space.
    To report an incorrectly solved CAPTCHA, run:
    dbcclient.exe -l USERNAME -p PASSWORD -n CAPTCHA_ID


    There's also the HTTP API...

    Thanks for your time and effort!
Sign In or Register to comment.