The differences between Data Driven and Keyword Driven framework are described below.In data driven testing, we can run our tests on multiple data in multiple combinations with the help of parameterization. Here the data is treated as an input to the test script logic. Each data set can be treated as a separate test case.In keyword driven testing, the keywords that are developed represent an action. A list of keywords maintained in sequence form a test case. Thus a keyword once developed can be used in multiple test scripts.The data driven framework revolves around the data (maintained in excel, csv ... Read More
Suppose we have a Binary Search Tree and one target value; we have to check whether there exist two elements in the BST such that their sum is equal to the given target or not.So, if the input is likethen the output will be True.To solve this, we will follow these steps −Define an array vDefine a function inorder(), this will take root, if root is null, then −returninorder(left of root)insert value of root into vinorder(left of root)Define a function findnode(), this will take k, n := size of vwhile i < j, do −t := v[i] + v[j]if t ... Read More
Data driven framework is used for segregating test script logic from the test data. In this framework, we can run our test scripts using multiple sets of data in multiple combinations with the help of parameterization. The test data is maintained in separate files like excel, access, txt and so on.The test scripts need to be connected to these external files for fetching the data. The primary aim of this framework is to run our test scripts against various sets of data thereby reducing the number of test cases.Data driven framework has more test coverage, reusable features and is easy ... Read More
Keyword driven framework is also known as table driven framework. Here we have a table where we describe the keywords or actions for the methods that have to be executed.Automation test scripts are developed based on the keywords or actions mentioned in excel. The automation testers need to extend the framework capabilities by updating or building newer keywords.People working on manual testing with lesser programming knowledge can use this framework. The main idea is to identify the keywords or actions and utilize them in excel maintained for that particular test scenario. Often this excel sheet becomes a substitute for a ... Read More
A framework is a set of rules, guidelines and best practices that are followed to get the desired results. A testing framework should have the features listed below:Should support more than one browser.Should run on multiple platforms.Should run on multiple programming languages like Java, Python, C#, Ruby and so on.Efficient handling of test data.Test case creation and updating are easy and maintainable.Provision for setting priority for each test case execution.Efficient test report generation.Proper test history maintenance for interpreting trends and analysis of execution results.Integration with continuous integration tools like Jenkins.Minimal manual intervention.Increases efficiency and productivity.Ensures efficient test code coverage.The types ... Read More
Suppose there is a set S that is originally containing numbers from 1 to n. But unfortunately, due to some error, one of the numbers in the set got duplicated to another number in the set, which results in repetition of one number and loss of another number.Now if we have an array called nums that is representing the data status of this set after the error. Our task is to find the number occurs twice and then find the number that is missed. return the results in the form of an array.So, if the input is like [1, 2, ... Read More
We can verify the color and background color of a web element in Selenium with the help of getCSSValue() method.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class CssColorValue { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe"); WebDriver driver = new ChromeDriver(); String url = "https://www.tutorialspoint.com/index.htm"; driver.get(url); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); //getting color attribute with getCssValue() String colr = driver.findElement(By.xpath("//*[text()=’GATE Exams’]")) ... Read More
Suppose we have an array with n elements, we have to find the contiguous subarray of given length k that has the maximum average value. We have to return the maximum average value.So, if the input is like [1, 13, -5, -8, 48, 3] and k = 4, then the output will be 12.0, as (13-5-8+48)/4 = 12.0.To solve this, we will follow these steps −sum := 0for initialize i := 0, when i < k, update (increase i by 1), do −sum := sum + nums[i]maxi := sumfor initialize i := k, when i < size of nums, update ... Read More
The differences between Selenium and UTP are listed down below.sl.no.SeleniumUTP1It is open source and can be used free.It is a licensed tool and is commercialized for use.2It supports the majority of browsers like Chrome, Firefox, Internet Explorer, Safari and so on.It supports Chrome, Firefox and Internet Explorer.3It only tests web based applications.It tests both windows and web based applications.4There is no in built object Repository.By default, object repositories are available and maintained.5It can be developed on multiple languages like Java, C#, Javascript, Python and so on.It can be developed only on VB scripts.6There is no external support for vendors for ... Read More
Suppose we have a non-empty binary tree; we have to find the average value of the nodes on each level in the return the average values as an array.So, if the input is likethen the output will be [3, 14.5, 11].To solve this, we will follow these steps −Define an array resultDefine one queue qinsert root into qwhile (not q is empty), do −n := size of qDefine an array tempwhile n is non-zero, do −t := first element of qinsert value of t into tempdelete element from qif left of t is not null, then −insert left of t ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP