Web-based applications have complex mechanisms, and it is challenging to perform any test. Computerization examination applies automation tools to decrease individual interference and repeatable assignments. In this article, we have designed and implemented an automation testing framework for web applications. The Selenium WebDriver tool was used to execute this innovative automated testing model. With this structure, testers can match the widgets with pre-trained dataset by taking screenshots of the web pages and by clicking automatically using PyAutoGUI. The screenshot property of the framework is useful to creators for evaluating their design of the web page. We introduced a novel methodology for widget detection, widget classification and testing coverage using machine learning and image processing concept. In this approach, we can give the URL as input, so, the GUI widget images can be quickly captured from the server and do not require large storage repositories to be used as training samples. Widgets of GUI images are detected from the pre-trained datasets by applying BLOB text detection. After identifying the widgets, they are classified into domain-specific categories, for example, labels, buttons, input boxes, check boxes, and links). Finally, it is evaluated to achieve a mean GUI component categorization of superior precision. Previous works have mostly used Java GUIs, Python GUIs, and Visual Basic GUIs to distinguish the types of widgets, but in our work, we observed the types of widgets using Image Processing. From this automated testing implementation on web applications, we have achieved 98.4%. of test coverage accuracy.