Thank you so much Mukesh.I followed all your videos, learned selenium and very happy news is i get selected in infosys for automation testing profile. Without you and your teaching, it is not possible. I owe you. Again thank you so much.
Thanks mukesh ..i was able to read pdf files through tesseract jar file..its an wesome api..it has solved one of the most promising problem of reading pdf files through selenium..
This is useful only for capturing simple captchas where there is less background noise. For distorted captcha images it never reads everything . Always shows as blank , All the tutorials in the web are showing simple captchas which can be easily done but no body is showing real practical examples
Mukesh how to catch and print a toast message which goes after 6seconds saying that you will be logged out after 6 seconds.. then 5 seconds.. 4 then 3.. 2 and 1 then vanish. Please help me out with this.
Hi Rohit, We have capctha lib which you can implement in any web application. Do check CAPTCHA lib framework . This video covers how to capture text from CAPTCHA.
HI Mukesh, When i try to take a screenshot in selenium ,it captures the whole divsion/class(not the individual element).[not the captcha,instead of the whole screen]. Whats is the cause for this,Could you please assist.. Code as below : File screenshot=driver.findElement(By.cssSelector("img[id =\"captchaImg\"]")).getScreenshotAs((OutputType.FILE)); File screenshot_location =new File("C:\\Users\\manoj.png"); FileHandler.copy(screenshot,screenshot_location);
Hi Mukesh, I am trying to automate the Google captcha V3 which shows text to be entered. I am trying to take a captcha image and read the text out of it. But every time some characters are missed. How will I be able to proceed with automation.
By the use of this technique,digits in captcha are copying in the form of ASCII characters in the textbox like "95da2f" is copied as "95da’z" as it is displaying correct in the saved image.Please reply.I need your help.Please reply to my problem.
Hi Mukesh, I have successfully read the text from image Captcha, but after login to the page error message is showing on the screen. It's successfully login to the page but next test cases are not executing and the error message is showing : org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element. Kindly help to fix this issue, Thank you
sorry to be so off topic but does someone know of a trick to get back into an Instagram account..? I somehow lost the password. I love any tricks you can give me.
@Hassan Alijah thanks so much for your reply. I got to the site thru google and im trying it out atm. Looks like it's gonna take a while so I will get back to you later when my account password hopefully is recovered.
Hi Mukesh, Can you please provide steps to setup environment variable and what all require to install . I am getting error as "Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory" thanks in advance, Srinivas Kassa
Hi Mukesh, I tried doing this code, it runs successfully but it does not capture the text written in captcha. Shows error in docr. It does trys to read the text and shows in separate box but does not capture so that it can enter in nlpAnswer field. Can you guide where it may be going wrong. Many thanks in advance
@@Mukeshotwani thank for your response,much appreciated. I tried same website as you have for practice. But it cannot find the input path and that's where it fails to capture the image despite highlights the text. Not sure why it's not capturing image. Please guide Thank you
I use Eclipse on Mac OS and get an error like this: "Please make sure the TESSDATA_PREFIX environment variable is set to your" tessdata "directory. Failed loading language 'eng' ". Hope you can help me fix this error
For my case i want to solve Visual Captcha same like google captcha but too much easier almost 28 images to analyze n solve its just like this 5 Boxes will be given And on top command say click on desk or bottle and the objects under boxes are always in a same picture not different what should we do for this kind of captcha friend ?
Hi mukesh , I have used selenium version 3.141 , get captcha text from image is working or not in this selenium version. because I try it with your write code. Captcha Image was got. But not reading the captcha value. I got error -: Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified module could not be found.
Hi Mukesh, I am trying to break Gmail captcha. I've even taken the screenshot of that captcha element itself and then trying to convert it to text using Tesseract as u shown. But it's just returning few characters instead of returning the captcha text.. What could be the issue? Will u pls help me?
Thank u for reply sir, I tried with different version it is working fine.But I am getting Exception in thread "main" java.lang.Error: Invalid memory access
I m trying to automate this captcha, i tried with tesseract to automate but its giving wrong text it will be really appreciateif any one help me in this.
Loll screen shot will be dynamic and no company includes automating screen shot.This is impossible to automate captcha . If so it’s a security breach First one should know what is Captcha a program or system intended to distinguish human from machine input, typically as a way of thwarting spam and automated extraction of data from websites. If some one want to automate this then it is consider as pure lack of good automation strategy
Hello brother . I have captcha code h3b73bd When the user copy this I want to replace them in user clipboard through malware . Is that possible or not ?
@@Mukeshotwani I want to encode some text into image . Then I will send that image to user . When the user click on the image the virus will install and spread in his operating system . Work of this virus will do the following functions . After the installation of virus . The user clipboard will be paste the code that we have encoded in image as a string .. Now do you got it .
Sir give step by step installation step, with link code give in video, so make it like that one can test with this code and with all requirements like selenium 4 etc Thanks
@@paruldang952 i am able to get otp but it is not taking new one means it is not refresh inbox automaticaly thats why it taking old otp Any solution for it. ?
I am getting Error opening data file. eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "test data "directory. Failed loading language 'eng' Tesseract couldn't load any language!
Hello Mukesh, I am following your video and try the same capture but I got an error. Please help me in this how can I solved this as I am totally beginner in this. INFO: Found CDP implementation for version 99 of 97 Error opening data file ./eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages! Warning: Invalid resolution 0 dpi. Using 70 instead. [Utils] Attempting to create E:\Softwares\Project\Amazonproject\test-output\Default suite\Default test.xml [Utils] Directory E:\Softwares\Project\Amazonproject\test-output\Default suite exists: true FAILED CONFIGURATION: @BeforeMethod login
Thank you so much Mukesh.I followed all your videos, learned selenium and very happy news is i get selected in infosys for automation testing profile. Without you and your teaching, it is not possible. I owe you. Again thank you so much.
I knew very little about Java, coding, eclipse and etc, but I was able to reproduce everything. Thanks for your time.
Thank you very much for covering this Tess4j API, by simple and precise manner.👍😊
Thanks mukesh ..i was able to read pdf files through tesseract jar file..its an wesome api..it has solved one of the most promising problem of reading pdf files through selenium..
Thanks Jitendra.. I am glad to hear from you.
I found one more library for pdf will upload video soon.
Wow. One of the most awaited tutorial. Thanks.
Appreciate Mukesh for your prompt responses to guys!
Thanks Kiran 🙏
This is useful only for capturing simple captchas where there is less background noise. For distorted captcha images it never reads everything . Always shows as blank , All the tutorials in the web are showing simple captchas which can be easily done but no body is showing real practical examples
Hi Ram you can DBC services for complex captcha www.deathbycaptcha.com/
note- it is paid service.
This is correct buddy, I have been looking at here & there to find out that how can I bypass the distorted captchas
Amazing tutorial. Congrats!
Thanks Mate 😃
Mukesh how to catch and print a toast message which goes after 6seconds saying that you will be logged out after 6 seconds.. then 5 seconds.. 4 then 3.. 2 and 1 then vanish. Please help me out with this.
Hi Mukesh,
Thank you for nice video and It is very helpful video if it is sum up with preparation of framework.
Very good explanation. What is the accuracy percentage of capturing correct text.
for me anuj 90 %
@@Mukeshotwani thanks
Great video, can you provide some insight on how to create CAPTCHA that can be implemented on any web framework.
Hi Rohit,
We have capctha lib which you can implement in any web application. Do check CAPTCHA lib framework . This video covers how to capture text from CAPTCHA.
Nice one Mukesh..
Very useful video..Thank You sir.
HI Mukesh,
When i try to take a screenshot in selenium ,it captures the whole divsion/class(not the individual element).[not the captcha,instead of the whole screen].
Whats is the cause for this,Could you please assist..
Code as below :
File screenshot=driver.findElement(By.cssSelector("img[id
=\"captchaImg\"]")).getScreenshotAs((OutputType.FILE));
File screenshot_location =new File("C:\\Users\\manoj.png");
FileHandler.copy(screenshot,screenshot_location);
Hi Mano, Are you using Selenium 4?
Thank you for this video Mukesh. Can you please tell me how to automate "I'm not a robot" checkbox captcha using selenium?
Very nice! Is it possible to automate mathematics captacha? Like 58+2 kind of things?
i believe it can be done by splitting the string and performing the respective calculation in the program itself
yes
Hi Mukesh,
I am trying to automate the Google captcha V3 which shows text to be entered. I am trying to take a captcha image and read the text out of it. But every time some characters are missed. How will I be able to proceed with automation.
I have not tried V3 captcha so far.
In captcha v3 version there is allow list option , ask the dev for more info.
By the use of this technique,digits in captcha are copying in the form of ASCII characters in the textbox like "95da2f" is copied as "95da’z" as it is displaying correct in the saved image.Please reply.I need your help.Please reply to my problem.
Thank you for great video sir.
Thanks Mukesh for this video
Hi Mukesh, I have successfully read the text from image Captcha, but after login to the page error message is showing on the screen. It's successfully login to the page but next test cases are not executing and the error message is showing : org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element. Kindly help to fix this issue, Thank you
Hi Deepak, please check locators and sync issue here
Thanks Mukesh it is good to know that we gonna handle some kind of captcha using selenium. Thanks again for the session 👍
sorry to be so off topic but does someone know of a trick to get back into an Instagram account..?
I somehow lost the password. I love any tricks you can give me.
@Leo Eden instablaster :)
@Hassan Alijah thanks so much for your reply. I got to the site thru google and im trying it out atm.
Looks like it's gonna take a while so I will get back to you later when my account password hopefully is recovered.
ERROR net.sourceforge.tess4j.Tesseract - Unsupported image format. May need to install JAI Image I/O package, getting this error, pls advise
Hi Bhavana which kind of image you are using? please use same version of tools which I used in Video.
Hi Mukesh, Can you please provide steps to setup environment variable and what all require to install .
I am getting error as "Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory"
thanks in advance, Srinivas Kassa
Hi Srinivas try keeping trained data in project home directory and try again.
Hi Mukesh, I tried doing this code, it runs successfully but it does not capture the text written in captcha. Shows error in docr. It does trys to read the text and shows in separate box but does not capture so that it can enter in nlpAnswer field.
Can you guide where it may be going wrong.
Many thanks in advance
Hi Mate, if captcha has some lines or some overlapped char then it will not capture.
@@Mukeshotwani thank for your response,much appreciated. I tried same website as you have for practice. But it cannot find the input path and that's where it fails to capture the image despite highlights the text. Not sure why it's not capturing image. Please guide
Thank you
How are you using Selenium 4 if it has not been released officially?
Beta version you can also use I have given link in video description
I use Eclipse on Mac OS and get an error like this: "Please make sure the TESSDATA_PREFIX environment variable is set to your" tessdata "directory.
Failed loading language 'eng' ".
Hope you can help me fix this error
Hey Chi please follow video again because I have explained how to load language.
try adding: image.setDatapath(System.getProperty("user.dir")+"/tessdata/");
image.setLanguage("eng");
@Mukesh: Thanks for the video. But this is not able to read numbers. Can you help how to read numbers?
Hi Mukesh,
I've tried with the code you mentioned, Its not getting accurate image text everytime. Could you please provide me the solution
Hi Mukesh
How to handle the image captcha such as by clicking traffic light from the images section?
"TESTDATA_PREFIX environment variable is set to your testdata directory"
This eroor is coming again and again
Please help me how to resolve the issue
Very Informative!
For my case i want to solve Visual Captcha same like google captcha but too much easier almost 28 images to analyze n solve its just like this 5 Boxes will be given And on top command say click on desk or bottle and the objects under boxes are always in a same picture not different what should we do for this kind of captcha friend ?
Sorry Ahmed I dont think we can automate google captchas. if you find any solution then do share with me.
Ahmed raza
Hi mukesh , I have used selenium version 3.141 , get captcha text from image is working or not in this selenium version. because I try it with your write code. Captcha Image was got. But not reading the captcha value.
I got error -: Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified module could not be found.
Same Here
Hi Mukesh, I am trying to break Gmail captcha. I've even taken the screenshot of that captcha element itself and then trying to convert it to text using Tesseract as u shown. But it's just returning few characters instead of returning the captcha text.. What could be the issue? Will u pls help me?
Hi Mukesh, can you help me, how to achieve in java project.How to load eng trained language in java project rather than using maven project.
Hey Sathish you need to download all jars and then add in the same project.
When I am trying to add tess4j to the pom. xml(maven project) , my project got corrupted. Please give solution so i can do it
Hi Rama, try changing the version.
Thank u for reply sir, I tried with different version it is working fine.But I am getting Exception in thread "main" java.lang.Error: Invalid memory access
Hi @Mukesh, Now it is not reading captcha properly on IRCTC login page
Yes Dinesh seems they changed captcha type
Hello mukesh ji
Hi Mukesh, I tried doing this code,it runs successful but it doesn't capture the text written in captcha..
How can I automate aws certificate validation instead of manually typing numbers and verify?
Hi mukesh .iam getting java.lang.Error: Invalid memory access error . I able get screenshot but unable to covert into text .plz help me
Hey Sunil, this seems some Java issue which version of Java you are using?
Thank you soo much.
Most welcome sir
One question sometime captcha is like some zebra crossing image etc how to handle that
Where can I find the trained data file for numeric values
can we read pdf file using tesseract api ..pdf file reading is one of the main issue we face while trying to read the pdf file using automation..
Hi Mukesh
Thank you for this nice video.
Can you please make a video on mocha, chai framework.
Thanks in advanced
Ranjeet Kumar
Sure Ranjeet, I will record video on mocha and chai soon.
Hi, do you know how to bypass CloudFlare detection in Selenium? I have been stuck for days now. Thank you in advanced!
Sir I need this for python if you have any video of python so please share me or if you don't have then plz tell how can I do in python
Hey Sudarya this is for python www.pyimagesearch.com/2017/07/10/using-tesseract-ocr-python/
Hello Mukesh,
Do you have any idea about HP ALM with Selenium Integration, Please suggest.
Thanks,
Ankit Sharma
Using bumble b
Hi Mukesh, Is there any possibility of handling Google Captcha?
No Ragu, I dont think so but never tried with google captcha.
Mukesh otwani ok thanks Mukesh
Hi...where to find Tosca video tutorials and how to learn Tosca automation tool plz
It is fine, please tell me, How to automate recaptcha v3?
No solution for that as such
We automate the recaptcha v3 locally, can this ( same selenium script) work for live?
ITesseract image = new Tesseract
This line give error .i was import all 4 lines of top still this line also show error plzz help sir
Hi Akshay it means dependency are not downloaded properly.
Hi sir where to get the path file which is just above the pom.xml
Hi Santosh here is the link github.com/tesseract-ocr/tesseract
Can you help me also on how to get the path folder, I tried it from the below link but no luck
sir please make this whole proccess in python and explain sir and share code please.
loved the way of your explaination sir
Yes mate soon coming full Python and JS series.
@@Mukeshotwani sir how can i contact you . can you share your mail
I m trying to automate this captcha, i tried with tesseract to automate but its giving wrong text it will be really appreciateif any one help me in this.
What wrong text? Which site you referred?
@@Mukeshotwani : Hey Mukesh I have shared you Code snippet sent email from vinay.tiwari3006@gmail.com.Looking for your valuable response.
is it posible to do funcaptcha?
Sorry Adam not sure about funcaptcha
Hi Mukesh...
Could you plz help how to automate otp on personal mobile number in mobile automation (appium).
Hi Vijay, I dont have any video on that, I will try to record and will upload soon.
By using Twillio API URL:www.twilio.com/docs/usage/api
Hey Mukesh, Can I capture bold text from image using OCR? quick reply would be appriciated. :)
Yes Shiva
is this working for meg tipeer?
I need it for python please
Here is the link Shiva pypi.org/project/pytesseract/
This only works for only on 32bit JAVA version. it doesn't work 64bit.
I ran scrpit by following this video but cannot automate captcha
i am getting some error , can u try to help me mukesh
Hi Krishana what error you are getting?
@@Mukeshotwani I already I mailed you
@@Mukeshotwani Tesseract null
Is this work with headless mode ?
I haven't tried but I guess it should work.
I need for python
Can we automate captcha having cross all around the pattern
amit mishra boss captcha is related to security
Loll screen shot will be dynamic and no company includes automating screen shot.This is impossible to automate captcha . If so it’s a security breach
First one should know what is Captcha
a program or system intended to distinguish human from machine input, typically as a way of thwarting spam and automated extraction of data from websites.
If some one want to automate this then it is consider as pure lack of good automation strategy
amit mishra what u want to automate captcha ?
How to handle captcha in TestProject
Please make this video in katalon studio version, thanks for advance
Nice!!
Super
Thanks Shiva
Can we do it by using testproject
No, You can't.
Hello brother .
I have captcha code h3b73bd
When the user copy this
I want to replace them in user clipboard through malware .
Is that possible or not ?
Sorry I did not get your requirement.
@@Mukeshotwani
I want to encode some text into image .
Then I will send that image to user .
When the user click on the image the virus will install and spread in his operating system .
Work of this virus will do the following functions .
After the installation of virus .
The user clipboard will be paste the code that we have encoded in image as a string ..
Now do you got it .
@@HamzaKhan-om8gi sorry Hamza no idea on this.
Sir give step by step installation step, with link code give in video, so make it like that one can test with this code and with all requirements like selenium 4 etc Thanks
Hello mukesh sir i want to read OTP from gmail how can do that please help
Use gmail api.
@@paruldang952 i am able to get otp but it is not taking new one means it is not refresh inbox automaticaly thats why it taking old otp
Any solution for it. ?
I am getting
Error opening data file. eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "test data "directory.
Failed loading language 'eng'
Tesseract couldn't load any language!
Hi Rama, keep trained data in home directory as well and then try.
@@Mukeshotwani Hi Mukesh, I have kept the trained data in home directory but still i am getting the same error. Pls help
Is there same in python script anywhere?
pypi.org/project/pytesseract/
Hi
Am getting NoclassDefFoundError: com/sun/jna/Pointer
Hi Shraddha , may I know hw did u solve this issue?
sir can u solve the captcha of irctc generated at 10:00 AM and 11:00PM
Hi , Mukesh
Can we automate Numerical captcha Like ( Pl)
LIke (21+3 or 18-8)
Hi Umakanta I have not tried but you can pass the trained data set and you will be able to read the same.
please make a video with python
Hello sir how to handle captch selenium with python ,if you have any videos please share me.
Hi Biswaranjan, I will make video for python too. In the meanwhile please visit below link
pypi.org/project/pytesseract/
can you solve google captcha?
No mate , above solution works for text based captcha or images based
sir i send u a email pls see and reply me
Hello Mukesh,
I am following your video and try the same capture but I got an error.
Please help me in this how can I solved this as I am totally beginner in this.
INFO: Found CDP implementation for version 99 of 97
Error opening data file ./eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Warning: Invalid resolution 0 dpi. Using 70 instead.
[Utils] Attempting to create E:\Softwares\Project\Amazonproject\test-output\Default suite\Default test.xml
[Utils] Directory E:\Softwares\Project\Amazonproject\test-output\Default suite exists: true
FAILED CONFIGURATION: @BeforeMethod login
I got this error
Reason:
java.lang.NoSuchMethodError: com.sun.jna.Native.load
anyone can help, please ??
Thank You