Posts

driver.close() vs driver.quit()

driver.close()
The driver.close() command is used to close the current focused browser tab. In case there is only one browser open then calling driver.close() quits the whole browser session.

It is best to use driver.close() when we are dealing with multiple browser tabs or windows e.g. when we click on a link that opens another tab. In this case after performing required action in the new tab, if we want to close the tab we can call the driver.close() method.

//Closing the single tab
driver.close();


driver.quit()
The driver.quit() is used to quit the whole browser session along with all the associated browser windows, tabs and pop-ups.

It is best to use driver.quit() when we no longer want to interact with the driver object along with any associated window, tab or pop-up. Generally, it is one of the last statements of the automation scripts. In case, we are working with Selenium with TestNG or JUnit, we call driver.quit() in the @AfterSuite method of our suite. Thus, closing it at t…

Installing chocolatey on Windows

Install chocolatey/choco on Windows 10
Click Start and type “powershell“
Right-click Windows Powershell and choose “Run as Administrator“
Paste the following command into Powershell and press enter.

Set-ExecutionPolicy Bypass -Scope Process -Force; `
  iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Answer Yes when prompted
Close and reopen an elevated PowerShell window to start using choco

Example usage:

choco install chromedriver

Selenium supports Java

Programs written in Java are faster than other popular languages like Python
Java is more widely used in commercial applications as compared to other programming languages like Python and hence integrating Selenium tests it easier

Run Selenium Automated Test

Selenium is the first thing that comes to mind when one is planning to automate the testing of web applications. Selenium is a beneficial tool because it is not only open source but also a portable software testing framework for web applications that support multiple languages like Java, C#, Ruby, Python. Choosing the right language depends on the application under test, the supporting community, available test automation frameworks, usability, elegance, and of course, seamless build integration.

Creating an XML Sitemap in WordPress using Yoast SEO

The easiest way to create an XML sitemap in WordPress is by using the Yoast SEO plugin.

It is the best WordPress SEO plugin on the market offering you a comprehensive set of tools to optimize your blog posts for SEO.

First, you need to install and activate the Yoast SEO plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to SEO » General page and switch to the 'Features' tab. From here, you need to scroll down to the 'XML Sitemap' option and make sure that it is turned on.

Import Blogger to WordPress

To start importing your Blogger site into WordPress, you need to login to your WordPress admin area and visit Tools » Import. On the Import page, go ahead and click on the 'Install Now' link below Blogger.