Found 455 Articles for Software Testing

How to click on a link in Selenium?

Debomita Bhattacharjee
Updated on 10-Jun-2020 12:12:34

2K+ Views

We can click a link in Selenium by the following locators along with click() method.By link text.By partial link text.Code Implementation with link text locator.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 LinkScripting {    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().timeouts().implicitlyWait(10, TimeUnit.SECONDS);       driver.findElement(By.linkText("Coding Ground")).click();       driver.close();    } }Code Implementation with partial link text locator.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; ... Read More

How do you enter text in the edit box in Selenium?

Debomita Bhattacharjee
Updated on 10-Jun-2020 12:09:59

1K+ Views

We can enter text in the edit box in Selenium by the following ways −By invoking sendkeys() method.Using the class JavascriptExecutor.Code Implementation with sendkeys() 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 TextEnter {    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().timeouts().implicitlyWait(12, TimeUnit.SECONDS);       driver.findElement(By.className("gsc-input"))       .sendKeys("Selenium");       driver.close();    } }Code Implementation with class JavascriptExecutor method.Exampleimport org.openqa.selenium.By; ... Read More

What are the most basic steps to write a web driver script?

Debomita Bhattacharjee
Updated on 10-Jun-2020 12:06:16

52 Views

The most basic steps to write a web driver script are listed below −Open any browser by creating a webdriver reference pointing to the corresponding browser driver class.Launch any URL with the get() method.Pause for some time for the page load.Confirm that we are on the correct web page.Finally close the session.Code ImplementationExampleimport 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 WebScripting {    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";     ... Read More

What is Selenese ?

Debomita Bhattacharjee
Updated on 10-Jun-2020 12:04:50

2K+ Views

Selenium IDE by default has a language system commonly called Selenese. It is a group of commands used to perform operations on the web. It primarily helps to develop scripts in Selenium IDE.It can verify if an element is present on a screen, alerts, Ajax calls, links and many more. There are three types of commands used in Selenese. They are as the following −Actions − These are the commands which can change the condition of an application. For example, clicking a checkbox, submitting a form, selecting an option from dropdown. In case the action is not performed on the ... Read More

List down the name of the Web drivers supported by Selenium.

Debomita Bhattacharjee
Updated on 10-Jun-2020 12:03:10

979 Views

The name of the web drivers supported by Selenium are listed below −Google Chrome Driver [ ChromeDriver() supports chrome ]HTML Unit Driver [ WebClient() supports chrome, firefox and IE ]Safari Driver [ SafariDriver() supports Safari ]IOS Driver [ IOSDriver() supports ios ]Android Driver [ AndroidDriver() supports Android ]OperaChromium Driver [ ChromeDriver() supports opera ]Gecko Driver [ FirefoxDriver() supports firefox ]Microsoft WebDriver [ InternetExplorerDriver() supports IE ]EventFiring WebDriver [ EventFiring Driver() supports majority of browsers ]Code Implementation with Firefox driverExampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; public class BrowserDriverScript {    public static void main(String[] args) ... Read More

Why does the Selenium WebDriver have an edge over Selenium RC?

Debomita Bhattacharjee
Updated on 10-Jun-2020 11:57:10

232 Views

Selenium was introduced as a part of version 1.0 of Selenium. Selenium WebDriver was introduced as a part of version 2.0 of Selenium. Selenium RC is deprecated and obsolete now. Though some users still use Selenium RC, the support for it is not there anymore.Selenium RC enabled the feature of recording scripts in multiple browsers namely Chrome, Safari, IE and so on. Also, it had communicated with the browser via the Selenium RC server.Selenium Web Driver supported cross browser testing and did not require the Selenium Server which enhanced its speed of execution. Overall Selenium RC had an architecture which ... Read More

What is Selenium Grid?

Debomita Bhattacharjee
Updated on 10-Jun-2020 11:55:44

218 Views

Selenium Grid is a tool designed to distribute tests across more than one browser and environments. With this concept, we can trigger numerous test cases simultaneously on various devices and platforms. In short, it allows parallel execution.Thus Selenium Grid helps to achieve concurrent test execution saving a large portion of resources.So what are the advantages of using Selenium Grid?Parallel execution results in saving a considerable amount of resources.Allows cross browser testing.With the help of more than one machine nodes, test execution can be scattered and then executed.In Selenium Grid, a hub is a server that monitors concurrent execution on various ... Read More

What is the Selenium Web Driver Architecture?

Debomita Bhattacharjee
Updated on 10-Jun-2020 11:53:21

8K+ Views

Selenium Web Driver architecture in a simplified diagram is described below:Let us now understand the Selenium Web Driver Architecture. Selenium WebDriver API enables interaction between browsers and browser drivers. This architecture consists of four layers namely the Selenium Client Library, JSON Wire Protocol, Browser Drivers and Browsers.Selenium Client Library consists of languages like Java, Ruby, Python, C# and so on. After the test cases are triggered, entire Selenium code will be converted to Json format.JSON stands for Javascript Object Notation. It takes up the task of transferring information from the server to the client. JSON Wire Protocol is primarily responsible ... Read More

What is Selenium and why is it chosen extensively?

Debomita Bhattacharjee
Updated on 10-Jun-2020 11:47:04

120 Views

Answer: Selenium is an automation testing framework or suite developed by Jason Huggins in the year 2004. It has been upgraded several times in the past. Selenium WebDriver 2.0 came in the market in the year 2011, 3.0 in the year 2016 and currently the latest version is 4.0.Selenium is used to create automation scripts for verifying functional requirements in web applications thus reducing the manual testing efforts and increasing quality and productivity. It also supports a vast range of browsers and platforms.Selenium is not a standalone tool; it is rather considered as a package of multiple tools so it ... Read More

Difference between Black Box Testing and Gray Box Testing

Kiran Kumar Panigrahi
Updated on 24-Nov-2022 12:48:36

2K+ Views

Black Box Testing and Gray Box Testing are the two types of testing used to test a software which are based on feedback from real customers using real products in real environments, but they are driven by distinct goals and processes. In this article, we will discuss the major differences between black box testing and gray box testing by considering different parameters. But before that it is important know the basics of black box testing and gray box testing to understand the differences between them. What is Black Box Testing? A software testing technique that is used to check ... Read More

Advertisements