Author: admin

  • Security Assertion Markup Language

    Security assertion markup language, or SAML, is an open standard used for authentication and is based upon the extensible Markup Language (XML) format. Web apps use it to transfer authentication data between two parties – the identity provider (IdP) and the service provider (SP). It provides a way to achieve SSO where the user can…

  • OpenID

    This is currently the most commonly used method of authentication and is more accessible to the end user. OpenID is a protocol that uses identity provider(s) to validate a user. This allows service providers a way to achieve Single SignOn (SSO), thereby allowing users to use one set of credentials to log into several related yet independent…

  • Authentication Methods in Web Applications

    We have many ways in which an app can be authenticated. Let’s look at each of them one by one: Cookie-Based Authentication Cookies are generally used to handle user authentication in web applications. Here’s a diagram that shows how this works: Working of cookie-based authentication in web apps: As you can see here, the client…

  • What’s Authentication?

    In simple terms, Authentication is the process of verifying the identity of a user or information. This means it is used to prove that some fact or some document is genuine, true or valid. What happens is that a user confirms their identity by providing their credentials. This piece of information is shared between the user…

  • Browser Windows

    You will come across cases where we have to use popup window or opening of a new browser window. In this chapter, we will discuss how to test such cases using Watir. Syntax browser.window Output On-click of button Open Window, the popup window opens up. Here, the url we have given is www.google.com. Now let us…

  • Downloads

    We have buttons or links in the UI or our website which downloads a pdf, or a doc. We can test that for using with Watir by giving some preferences to the browser. The prefs has download wherein we need to give the path where we want the file to be stored after download and…

  • Alerts

    Syntax Testpage Watir Code

  • Capturing Screenshots

    Ability to capture screenshots is one of the interesting features available with Watir. During the test automation, you can take screenshots and save the screens. In case, if any error occurs the same can be documented with the help of screenshot. A simple example along with test page where we have taken the screenshot is…

  • Mobile Testing

    For Mobile testing, we are going to use Desktop browser which will act as device browser for testing purpose. Let us understand its procedure in this chapter. To test your app on mobile browsers we need to install the webdriver-user-agent. Installing webdriver-user-agent Now, we are going to use the Webdriver useragent as shown in the…

  • Headless Testing

    In this chapter, we will learn how to use headless option of the Watir webdriver to test the page url. Syntax Browser = Watir::Browser.new :chrome, headless: true Output Watir code We have added the option headless : true to the Watir chrome browser. When you execute the Ruby program, it will not open the browser, everything will…