VALIDATE MULTIPLE LINES OF TEXT IN SELENIUM WEBDRIVER



FILE HANDLING SCENARIO’S IN SELENIUM WEBDRIVER:
1. Read the text displayed in the WEBSITE: Actual
Automate Coronavirus COVID19 REST API POST METHOD Tutorial Part2
2. Maintain this text in a txt file : Expected
Automate Coronavirus COVID19 REST API POST METHOD Tutorial Part2
3. Compare the values from STEP 1 and STEP 2.
4. Mark the TESTCASE as PASS/ FAIL.

JAVA API FOR READING THE CONTENTS OF THE TEXT FILE:
Following are the java classes useful in reading the text from the file.

  • import java.io.BufferedReader;
  • import java.io.File;
  • import java.io.FileReader;
  • import java.io.IOException;


Java Logic

Conclusion:
File Contents:: Automate Coronavirus COVID19 REST API POST METHOD Tutorial Part2
PASSED: validateTextfromWebPage

Leave a Reply

Your email address will not be published. Required fields are marked *