Found 719 Articles for Testing Tools

Difference Between Test Plan and Test Strategy

AmitDiwan
Updated on 27-Apr-2021 06:31:43

376 Views

In this post, we will understand the difference between test plan and test strategy −Test PlanIt is a document prepared for a software project that defines the approach, scope, and intensity required for software testing.It can be changed.It happens independently.It describes the details.It is only done by the test administrator or test manager.It is generally utilized at the project level.Its objective deals with how and when to test the product or system, and who would confirm it.Test StrategyIt is a set of instructions that explain the test design.They also help determine how the test has to be performed.It can’t be ... Read More

How to do session handling in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:08:55

5K+ Views

We can perform session handling with the help of Selenium webdriver with a TestNG framework. To trigger different sessions, we shall use the attribute parallel in the TestNG XML file.A TestNG execution configuration is done in the TestNG XML. To create multiple sessions, we shall add the attributes – parallel and thread-count in the XML file.The attribute thread-count controls the number of sessions to be created while executing the tests in a parallel mode. The value of parallel attribute is set to methods.In our example, we would have three methods with three different session ids which are executing in parallel.Exampleimport ... Read More

How does Selenium Webdriver handle SSL certificate in Chrome?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:09:31

2K+ Views

We can handle SSL certificate with Selenium webdriver in Chrome browser. A SSL is the standardized protocol used to create a connection between the browser and server.The information exchanged via a SSL certificate is encrypted and it verifies if the information is sent to the correct server. It authenticates a website and provides protection from hacking.An untrusted SSL certificate error is thrown if there are problems in the SSL certificate. We shall receive such an error while we launch a website. In Chrome, we use the ChromeOptions class to work with SSL certificates.We shall create an instance of this class ... Read More

How to automate google Signup form in Selenium using Python?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:10:14

903 Views

We can automate Google Signup form with Selenium webdriver in Python. To automate this page, we have to first launch the Google Signup page and identify each element on the form.Let us have a look at the Google Signup form −Examplefrom selenium import webdriver #set chromodriver.exe path driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") #implicit wait driver.implicitly_wait(0.5) #launch URL driver.get("https://accounts.google.com/signup") #identify elements within form f = driver.find_element_by_id("firstName") f.send_keys("Test") l = driver.find_element_by_id("lastName") l.send_keys("One") u = driver.find_element_by_id("username") u.send_keys("test124ewin") p = driver.find_element_by_name("Passwd") p.send_keys("test124@") c = driver.find_element_by_name ("ConfirmPasswd") c.send_keys("test124@") #get value entered s = f.get_attribute("value") t = l.get_attribute("value") v = u.get_attribute("value") w = p.get_attribute("value") print("Values entered in form: ... Read More

How to install Selenium package in Anaconda?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:01:25

5K+ Views

We can install the Selenium package in Anaconda. The conda has multiple packages so that it can be integrated with Selenium, Selenium-pytest, and so on from the below link − https://anaconda.org/searchA conda is a command line tool in the form of a package which is used for Anaconda.It has some similarities with pip. Selenium is present within the community based conda-forge channel available from the below link − https://anaconda.org/conda-forge/seleniumTo complete installation of this package, we can execute any of the below commands −conda install -c conda-forge seleniumconda install -c conda-forge/label/gcc7 seleniumconda install -c conda-forge/label/cf201901 seleniumconda install -c conda-forge/label/cf202003 seleniumRead More

How to get the following-sibling element for a table type of structure in Selenium?

Debomita Bhattacharjee
Updated on 08-Apr-2021 07:55:10

2K+ Views

We can get the following-sibling element for a table type of structure in Selenium webdriver. A following-sibling is used to determine the siblings of the context node.Also, these siblings should be present at the same hierarchy of the current node and share the same parent. Let us take an instance of a table with table tag having multiple children with tag tr.Then let us try to identify the elements in the third row highlighted on the below image from the first row which contains the table headers.Syntax//table[@id='table1']/tbody/tr[1]/following-sibling::tr[2]/tdHere, we are locating the third row in the table, but we have provided ... Read More

How to handle chrome notification in Selenium?

Debomita Bhattacharjee
Updated on 08-Apr-2021 07:52:08

5K+ Views

We can handle Chrome notification in Selenium webdriver. These are generally known as the web push notifications and can be handled with the help of the ChromeOptions class. The below image shows a notification from the browser Chrome −We have to create an object of this ChromeOptions class and apply the addArguments method on it. The parameter --disable-notifications is passed as a parameter to this method. Finally, this information is sent to the ChromeDriver.SyntaxChromeOptions o = new ChromeOptions(); o.addArguments("--disable-notifications");Exampleimport org.openqa.selenium.By; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.WebDriver; public class NotificationChrome {    public static void main(String[] args) throws IOException {   ... Read More

How to read test data from an excel sheet and use it to test facebook login in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 08-Apr-2021 07:47:53

911 Views

We can read test data from an excel sheet and use it to test Facebook login with Selenium webdriver in Python. We can access excel with Python with the help of the OpenPyXL library.To install this library, we have to run the command - pip install openpyxl. Besides, we have to add the statement import openpyxl in our code. To start with, we have to load the excel workbook with the help of the load_workbook method.The path of the workbook is passed as a parameter to this method. Then we have to determine its active sheet by applying the sheet ... Read More

How can we read data from an excel sheet in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 08-Apr-2021 07:47:25

2K+ Views

We can read data from an excel sheet in Selenium webdriver in Python.An excel workbook consists of multiple sheets and each sheet consists of cells and columns.To work with excel in Python(with extension .xlsx, .xlsm, and so on) we have to utilize the OpenPyXL library. To install this package, we have to run the command: pip install openpyxl. Also, we have to add the statement import openpyxl in our code.To open an excel workbook, the method is load_workbook and pass the path of the excel file as a parameter to this method. To identify the active sheet, we have to ... Read More

Screenshot of a particular element with Python Selenium in Linux

Debomita Bhattacharjee
Updated on 08-Apr-2021 07:45:08

481 Views

We can capture a screenshot of a particular element with Selenium webdriver in Python. To achieve this task, first we have to identify the element which we want to identify with the help of any locators like id, xpath, css, name, class name, tagname, link text or partial link text.After the element has been identified, we can capture its screenshot with the help of the screenshot method. We have to pass the file name where the screenshot shall be stored (along with extension) as a parameter to this methodSyntaxm=driver.find_element_by_tag_name("h4") m.screenshot("logo.png")Let us capture the screenshot of the highlighted text below −Examplefrom ... Read More

Advertisements