Testing Tools Articles

Found 517 articles

Moving mouse pointer to a specific location or element using C# and Selenium

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 17-Mar-2026 7K+ Views

We can move mouse pointer to a specific location or element in Selenium WebDriver with C# using the Actions class. This class provides methods to simulate user interactions like moving the mouse, clicking, and performing complex gestures on web elements. To move the mouse to an element, we use the MoveToElement method and pass the element locator as a parameter. To move to specific coordinates, we use the MoveByOffset method. All actions must be executed using the Perform method. Syntax Following is the syntax for creating an Actions object and moving to an element − ...

Read More

How to open a browser window in full screen using Selenium WebDriver with C#?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 17-Mar-2026 2K+ Views

We can open a browser window in full screen using Selenium WebDriver in C# by using the Maximize() method. This method is applied on the WebDriver object through the window management interface and expands the browser to fill the entire screen. Syntax Following is the syntax for maximizing a browser window − driver.Manage().Window.Maximize(); For setting specific window size, you can also use − driver.Manage().Window.Size = new Size(width, height); Using Maximize() Method The Maximize() method is the most common approach to open a browser in full screen mode. It automatically ...

Read More

Accessing HTML source code using Python Selenium.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 16-Mar-2026 4K+ Views

We can access HTML source code with Selenium WebDriver using two primary methods. The page_source method retrieves the complete HTML of the current page, while JavaScript execution allows us to access specific portions of the DOM, such as the body content. Syntax Following is the syntax for accessing HTML source using the page_source method − src = driver.page_source Following is the syntax for accessing HTML source using JavaScript execution − h = driver.execute_script("return document.body.innerHTML") Method 1: Using page_source Method The page_source method returns the complete HTML source code of ...

Read More

How to set style display of an html element in a selenium test?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 16-Mar-2026 3K+ Views

We can set the style display of an HTML element with Selenium WebDriver using JavaScript execution. The DOM interacts with page elements through JavaScript, and Selenium executes JavaScript commands using the executeScript method. This approach is particularly useful when you need to modify CSS properties like visibility, display type, or other styling attributes programmatically during test execution. Some operations like setting the style display must be performed by JavaScript Executor. The getElementById method locates the element, then we apply the style.display property to set the display type such as block, none, inline, or flex. Syntax Following is ...

Read More

How to simulate pressing enter in html text input with Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 16-Mar-2026 839 Views

We can simulate pressing enter in HTML text input fields using Selenium WebDriver. The sendKeys method allows us to send key presses to web elements, including the Enter key. This is commonly used for form submissions, search operations, or triggering input validation. Syntax Following is the syntax to simulate pressing Enter using Selenium − element.sendKeys(Keys.ENTER); Alternatively, you can use Keys.RETURN which produces the same result − element.sendKeys(Keys.RETURN); Both Keys.ENTER and Keys.RETURN represent the same key press action and can be used interchangeably in Selenium automation. Required Import To ...

Read More

How to get HTML code of a WebElement in Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 16-Mar-2026 5K+ Views

We can get the HTML code of a WebElement using Selenium WebDriver by accessing the innerHTML attribute. The innerHTML represents the HTML content between the opening and closing tags of an element, which includes both text content and any nested HTML elements. The getAttribute() method is used to retrieve the innerHTML value by passing "innerHTML" as a parameter. This method returns the complete HTML markup contained within the selected element. Syntax Following is the syntax to get the innerHTML of a WebElement − String htmlContent = element.getAttribute("innerHTML"); Where element is the WebElement object ...

Read More

Getting the return value of Javascript code in Selenium.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 15-Mar-2026 4K+ Views

We can get the return value of Javascript code with Selenium WebDriver using the executeScript method. This method executes JavaScript commands in the browser and can return values back to our Java code. To work with JavaScript in Selenium, we need to cast our WebDriver instance to JavascriptExecutor and import the necessary package. The JavaScript command is passed as a string argument to the executeScript method. Syntax JavascriptExecutor js = (JavascriptExecutor) driver; Object result = js.executeScript("return document.getElementById('elementId').value"); Key Points When working with JavaScript return values in Selenium: Use the return keyword ...

Read More

Reading JavaScript variables using Selenium WebDriver.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 15-Mar-2026 3K+ Views

We can read JavaScript variables with Selenium WebDriver using the executeScript method. This method allows Selenium to execute JavaScript commands directly in the browser and return their results. To work with JavaScript in Selenium, we need to import org.openqa.selenium.JavascriptExecutor. Syntax JavascriptExecutor j = (JavascriptExecutor) driver; String result = (String) j.executeScript("return document.title"); Reading Document Properties The most common use case is reading document properties like title, URL, or DOM elements. Let's obtain the browser title by reading the JavaScript variable document.title. Example Here's a complete example that reads the page title ...

Read More

Differences between Interface and Integration Testing.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 2K+ Views

Testing is crucial in software delivery, as it validates quality and helps developers improve their product. Two important testing types are Integration Testing and Interface Testing. Integration testing verifies that multiple components work together correctly, while interface testing focuses on the communication channels (APIs, web services) between those components. Integration Testing Integration testing is performed after unit testing to verify that individual components work correctly when combined in an integrated environment. It tests the end-to-end functionality of all components working together. Integration testing can be done in several approaches − Big Bang (all at once), Top-Down, Bottom-Up, or ...

Read More

Difference between Frontend Testing and Backend Testing

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 730 Views

A web-based application is generally based on a three-tier architecture. The first layer is the presentation layer (front-end), the second is the business/application layer, and the third is the database layer (back-end). Testing can focus on either the front-end or back-end, each requiring different skills and approaches. Three-Tier Web Application Architecture Presentation UI / Front-end Frontend Testing → Business Logic Application Layer ...

Read More
Showing 1–10 of 517 articles
« Prev 1 2 3 4 5 52 Next »
Advertisements