Posts

Showing posts with the label selenium

Integrating Cucumber with Maven and Selenium: A Comprehensive Guide

Integrating Cucumber with Maven and Selenium: A Comprehensive Guide In modern software development, testing is crucial to ensure the quality and functionality of applications. Automated testing frameworks like Cucumber, when integrated with tools like Maven and Selenium, provide a robust solution for creating reliable and maintainable test cases. This article will guide you through integrating Cucumber with Maven and Selenium, enabling you to write and execute BDD (Behavior-Driven Development) tests efficiently. What is Cucumber? Cucumber is a popular testing tool that supports BDD. It allows you to write test scenarios in plain, readable language using Gherkin syntax. This makes tests more understandable for non-technical stakeholders and helps bridge the communication gap between technical teams and business users. What is Maven? Maven is a build automation tool used primarily for Java projects. It simplifies project management by handling dependencies, building projects, and managin...

Serenity custom driver serenity.properties file configuration

Custom WebDriver implementations You can add your own custom WebDriver provider by implementing the DriverSource interface. First, you need to set up the following system properties (e.g. in your serenity.properties file): webdriver.driver = provided webdriver.provided.type = mydriver webdriver.provided.mydriver = com.acme.MyCustonDriver thucydides.driver.capabilities = mydriver Your custom driver must implement the DriverSource interface, as shown here: public class  MyCustonDriver  implements DriverSource {     @Override     public WebDriver newDriver() {         try {             DesiredCapabilities capabilities = DesiredCapabilities.chrome();             // Add             return new RemoteDriver(capabilities);         }         catch (IOException e) {         ...

How to Stop Selenium browser popup "Failed to load extension from : c:/users/internal. Loading of unpacked extensions is disabled by the administrator".

Image
How to Stop Selenium browser popup "Failed to load extension from : c:/users/internal. Loading of unpacked extensions is disabled by the administrator". You can stop this by creating webdriver with special properties. Example: ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.setExperimentalOption("useAutomationExtension", false);

How to handle browser admin login popup in selenium?

Image
How to enter username and password to this browser login popup? Solution: You can send username and password in the URL request. Example:  htpp://username:password@xyz.com But in the latest web browser url credentials are blocked because of security issues. Still you can use that features, you have to create web driver with some special operations. Example: ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--disable-blink-features=BlockCredentialedSubresources"); This feature consider as network error. You can reopen the URL. Example: driver.get(" htpp://username:password@xyz.com"); driver.get("xyz.com");

serenity cucumber selenium automation

BDD fundamentals Behaviour-Driven Development (BDD) is a collaborative approach to software development that bridges the communication gap between business and IT. BDD helps teams communicate requirements with more precision, discover defects early and produce software that remains maintainable over time. Writing acceptance criteria with Cucumber-JVM In Cucumber, you express acceptance criteria in a natural, human-readable form. For example, you want to write acceptance criteria for sending a mail you could write like this: Given I want to send a mail When I login to to mail box. clicked compose button, entered the details and clicked send Then I should see mail sent to the receiver. Sometimes tables can be used to summarize several different examples of the same scenario. Scenario Outline: sending a mail Given I have login to the mail box When I can enter the details '<Email>' and '<Subject>' Then I should see mail sent succes...

cucumber selenium automation for ag-Grid example

How to select row in xpath?