Posts

Fetch Text from Image & PDF Using Selenium Java

  In this blog, we will learn how we can fetch data from images and PDFs. This Blog Contains: Read Text From Image Using OCR with Tesseract (tess4j) Reading PDF Text Using PDFUtil Save PDF as Image Using PDFUtil Extract Images From PDF Using PDFUtil Fetch Text From Image In Selenium To get a text from the Image in selenium, we use Optical Character Recognition (OCR) with Tesseract (tess4j). Tesseract Supports UTF-8 Unicode. First, we need to create a folder with the name “tesseract” in our project and put trained data in that folder. You can find trained data for any language from the below URL: https://github.com/tesseract-ocr/tessdata Just Download eng. trained data for English Language and put it into Tesseract Folder for your project. Add below is maven dependency for tesseract (tess4j): <dependency> <groupId>net.sourceforge.tess4j</groupId> <artifactId>tess4j</artifactId> <version>4.5.4</version> </dependency> Below is the Java code

Parallel Execution Using Robot Framework

Image
  In this blog, you will learn how to execute two different robot classes parallelly. With the help of parallel execution, you can save test execution time. In this example, I am demonstrating how to run two different robot classes in parallel. Task:  Execute 02 different Robot Classes/All classes in a directory parallelly First, you need to install Pabot. For installing Pabot you need to follow the following steps: a) Open the command prompt. b) Type> pip install -U robotframework-pabot 2. Open the editor (e.g., PyCharm) you are using for the robot framework and add a library in all classes which you want to run parallelly. Note : Here I am using PyCharm as an editor. Here are the following ways to execute the suites parallelly. a) If you want to run two different robot classes parallelly then type the following command in PyCharm and press enter: “ pabottestcases/FirstRobotClassName.robottestcases/SecondRobotClassName.robot ” Note:  Here are test cases in the directory where I hav