Attempting to automate the verification of top navigation links on . https://i.stack.imgur.com/Mt6Zw.png When comparing actual URLs with expected URLs in the page class method, the line below returns null. I'm not sure why. String urlp = locator.all_topn ...
Can someone assist me with this question: I am seeking guidance on how to eliminate the instance driver from the BaseTest class while still being able to utilize it in the class and its subclasses? I am currently using POM to construct a testing-framewor ...
Since the pageFactory is now deprecated in C#, I am curious about how to properly initialize classes in C#. I attempted to use @Findby to call them in the Testcase, but it resulted in a large number of objects being written. Is there a more efficient way? ...
Currently, I have implemented the following method in my BasePage and I am looking to utilize this method in other pages as well. In this method, the parameter is currently set as (String xpathExpression). How can I modify it to accept a WebElement instea ...
When attempting to confirm whether the current URL matches the homepage URL, is it recommended to include the logic for retrieving the current URL directly within the test method, as shown in let currentUrl = browser.getCurrentUrl();, or should this logic ...
I am currently working on automating my tests using web driver, testng, and the page factory. However, I have encountered a null pointer exception while executing the code provided below. HomePage Page Object Class This is the page factory class. packag ...
As a newcomer to C#, I am exploring how to implement SpecFlow in a similar manner to how I utilized Gherkin, by assigning a unique name to an object and then invoking that name in the Step Definition. My main query pertains to incorporating the identifier ...
Looking for some help as I couldn't find a solution to my issue. I'm having trouble running tests in parallel using POM with page factory. *\ Testbase class */ public WebDriver driver; @BeforeClass @Parameters("Browsername&qu ...
Currently, I am involved in creating a selenium-based automation framework. As part of this project, I have developed a Dashboard page that consists of over 100 different web elements, each requiring specific actions to be performed on them. My question ...
Just diving into Nightwatch and JavaScript in general, I'm having trouble understanding how to validate a URL using the POM pattern. Any help or suggestions would be greatly appreciated! If you have any useful links for me to read through, that would ...
After setting up a Java Maven test project with Selenium, I am looking to transform it into the Page Object Design Pattern. It seems like we need to create classes for each page and then call them using objects in the main class based on what I've read in ...
Encountered a puzzling error while running a test in navigateAllMenus.java. When the script tries to locate loginLink, it halts and throws a java.lang.NullPointerException on line 28: _a_LoginPage.loginLink(driver).click();. Despite attempting different x ...
Currently in my test automation, I've implemented a basic version of the Page Object Pattern. However, I've noticed that there is redundancy in my code. Within a single class, I have multiple methods that essentially perform the same task but return diffe ...
While I have some basic experience with Selenium and Java, I am now seeking to delve deeper into the Page Object Pattern. However, I am having difficulty grasping how to effectively implement it in a real project. Despite my efforts to find straightforward ...
I am currently learning how to separate locators from the actual code in Selenium. I have managed to separate them so far, but I would like some guidance on optimizing the code further. Can the Page Object design model be used to not only store locators bu ...
When designing my web application, I adhere to the Page object model by utilizing a Base class that contains all common and reusable methods, as well as separate pages for each page of the application. Currently, I am faced with the task of creating a met ...
I am currently working on determining whether or not the button element is clickable, however I am facing difficulties in successfully validating this using Selenium WebDriver. Below is the code snippet I am using to validate if the element is clickable: ...
I am currently using a simple loop to click test a list of items. The loop is functioning smoothly, but I am wondering if it is possible to incorporate Page-Object design into this. I have searched for examples of others doing something similar but have ...
I am looking to access a series of elements with similar IDs ranging from 1 to 47. Rather than individually specifying each element, is there a more efficient way to create an array or list for easy iteration? [FindsBy(How = How.Id, Using = "ElementId1")] ...
Currently in the process of automating the flight booking feature on MakeMyTrip.com using Selenium WebDriver. I have implemented separate classes for Page Object Model (POM) and TestNG. The code successfully automates the process up to the point of clicki ...
My automation framework utilizes selenium, TestNG, and the PageObject model. In terms of structure: https://i.stack.imgur.com/xLPYB.png For my Testng class / test case: https://i.stack.imgur.com/WFM3p.png I encountered a null pointer error https://i.s ...
I am facing an issue with my Selenium WebDriver test using the Page Object Model. When I run the test, it opens two windows in the Chrome browser, with the first window being empty in the URL bar. How can I make it open only one window with the onet.pl URL ...
To accurately track user interactions, I require the WebElement name (User-defined) for reporting purposes. When performing a Click operation on AddMainConcernLink, I need to report whether the element was successfully clicked or not as "AddMainConcernLink ...
I currently have a Test automation tool and we are looking to implement the page object model for automating testing on our web applications. From what I understand, the page object model is ideal when you have only one application to test. However, we h ...