Posts

What are Broken Links?

  What are Broken Links? Broken links on a web application refer to hyperlinks that no longer point to valid web pages or resources. When a user clicks on a broken link, they will receive an error message instead of being directed to the desired destination. Why check for Broken Links using Selenium? Checking for broken links on a web page using Selenium can help ensure a better user experience for website visitors. When users encounter broken links, they may become frustrated and leave the site. Additionally, search engines may penalize websites with broken links, as they can indicate a lack of attention to website maintenance and quality. By using Selenium to automate the process of checking for broken links, website owners and developers can quickly identify and fix broken links before they become a problem for users or search engines. This can improve the overall quality and usability of the website, as well as potentially improve its search engine rankings. How to identify mis...

PyTest Unit Testing Framework with Example.

Image
What is Pytest: Pytest Benefits: Pytest Installation: This tutorial uses Python 3 , and we will be working inside a virtualenv . Python 3 has inbuilt support for creating virtual environments. We can very easily create and use a virtual environment for this demo project.  We need to run the following commands in the cmd.  mkdir pytest_demo     # this will create directory. cd pytest_demo           # move to newly create directory Python3 -m venv pytest-demo   # this creates a virtual environment called pytest-env in our working directory. To see, Run command dir [on Mac or Unix OS] source pytest-demo/bin/activate .  # This activates virtual environment. As long as this virtualenv is active, any package we install will be installed in this new virtual environment.   [on Winodws OS] pytest-demo\Scripts\activate pip install pytest     # This installs pytest on virtual environment. pytest -h      ...