All Questions
363 questions
0
votes
2
answers
69
views
Loose coupling for utility/helper classes
What solutions do you use to avoid tight coupling between classes when using utility classes like waithelpers, data formatting, selenium utils etc? I am using these classes having static methods, ...
0
votes
0
answers
22
views
How to resolve Null error displayed for shadowRoot element?
I have written this code in which I am able to get the shadow element:
package org.example;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa....
0
votes
1
answer
46
views
Maven Standard Directory Layout for UI Test Automation project on Java: what modules should be considered as main, and what as test?
Usually UI test automation framework is a separate code base, different from developers repository.
It is common to use Maven or Gradle as a build tool in test automation frameworks written on Java. ...
0
votes
1
answer
48
views
Best way to automate File contents verification using Selenium/Java?
In my application, there are lot of files that contain financial data and those are sent to different parties. So, I have to automate verification of content of all these files. Now, each file has a ...
0
votes
0
answers
60
views
How to run multiple Feature files parallelly in Cucumber with TestNG Runner?
I am facing one issue: I need to run 5 feature files that are totally independent of each other, Each feature files logs into a different site. I want 5 different ChromeDriver Browser sessions to open ...
0
votes
0
answers
22
views
Regarding Google Playstore Automation
I have this project where I have to automate the Play Store using Java and Appium.
Problem:
The problem I am facing is, that it seems like the buttons in the Play Store are changing their id's ...
0
votes
2
answers
123
views
How to use java classes of one Selenium project into Another project in Eclipse?
I have around 10 Selenium/Java projects in Eclipse IDE and there is "utils" package and Automation framework classes that i manually copied to all projects and all those have different ...
0
votes
1
answer
55
views
Get code from email - java
I have an automation flow where there is a need retrieve a code from an email and input it into as a verification code.
As its a demo I could use any temp email and grab it but I am wondering now what ...
0
votes
2
answers
109
views
How to handle this Particular date picker scenario where i want to traverse back in selenium
In this code i want to navigate to the year 2022 and select July and print that result in the console but the issue is that in the else if condition when checking when this particular condition is ...
0
votes
0
answers
170
views
How to connect to a Anti-Detect browser (Incogniton) using selenium java
I want to connect to a browser session of this specific anti-detect browser called Incogniton.
It does support Selenium browser automation, but it only supports Python. I don't know anything about ...
3
votes
1
answer
3k
views
Selenium latest version is not able to launch FireFox browser in Ubuntu 20.04
I'm trying to automate web tests with Selenium and Java in Ubuntu OS.
Earlier versions of Selenium used to work very well with older version of Firefox in Ubuntu.
Since I upgraded to
Selenium 4+ (...
0
votes
2
answers
272
views
how to automate a date picker that not in a table tag
I want to automate that starting date and end date but in DOM I can't find a Table tag for date picker so I don't know how to locate the field.
The tag is
<input class="inputvd" type=&...
-1
votes
1
answer
382
views
How to validate invalid date error message in Selenium Java project?
I have a "Date" field on my page I want to automate. Now, when I enter invalid value or invalid format, then its displays an error like:
"This is invalid value for "Date" ...
-1
votes
1
answer
516
views
Is it mandatory to return a PageObject instance in every Page Object save/submit method?
In the Page Object model, we separate page UI elements and Test methods. However, there is a concept of Page chaining, in which we return an object on the next Page Object in the previous page object ...
0
votes
4
answers
384
views
Selenium email automation
I'm trying to automate tests using Selenium and a Yahoo email address.
The problem is when I run my test in Azure DevOps I face the CAPTCHA privacy terms.
Any ideas on how to fix this problem?
-1
votes
1
answer
51
views
Verify that 4 products are shown with € symbol
I want to verify from this website: https://demo.nopcommerce.com/. There are 4 products shown with the Euro symbol by using for loop.
Code:
List <WebElement> productcurrency = driver....
1
vote
3
answers
192
views
Selenium Test cases for UI look
I have a test case, where I need to verify:
a user selects any of the options.
the text is not going out of the layout and displays complete
readability to the user.
As a result, the UI look and ...
7
votes
1
answer
895
views
Selenium + Java: How to get the OS, and Browser details on run time?
What I want to do is, while I'm running my tests, I want to get the current,
Operating System
Browser Name
Browser Version
This is for making the details clear in the test/bug report.
I haven't ...
2
votes
2
answers
1k
views
Not able to match ChromeDriver version with chrome version
So at my current job I’m at a pinch, we can’t just download executable jars and use them. We have to request to download whatever we want . So the problem is , our chrome gets auto updated where as we ...
2
votes
1
answer
234
views
Selenium Webdriver : Trying to get text, but specific class present
Kindly find attached the html code of the section in question
I use the following code and managed to get the text for Status
successMessage = driver.findElement(By.xpath("//span[@class='status-...
0
votes
1
answer
7k
views
Cannot invoke "org.openqa.selenium.SearchContext.findElement(org.openqa.selenium.By)" because "this.searchContext" is null error
I am trying to verify a functionality as a guest user and logged in user. In order to do that I log out form the system and verify the guest user actions then login again and verify logged in user ...
0
votes
1
answer
137
views
Element is not clicked even after explicit wait
I am trying to verify default selected value of a dropdown.
<div class="p-3 p-md-4 mt-4 mt-md-4 card"><div class="row"><div class="d-flex align-items-center col-...
2
votes
1
answer
293
views
Verifying scrollbar is present script fails
I'm trying to check whether a scrollbar is present when there are more than 2 elements in a pop up.
Here is the HTML code for the div which enables the scroll bar if when there are more than 2 ...
0
votes
2
answers
587
views
Button click was not performed even though element was found
I'm trying to click below button.
<button class="MuiButtonBase-root MuiButton-root jss47 jss58 MuiButton-contained jss48 jss59 MuiButton-containedPrimary MuiButton-disableElevation" ...
1
vote
2
answers
450
views
Getting value from data-value (webdriver selenium / java)
I have the following HTML code
<div class="mbsc-sc-whl-c" style="height:40px;margin-top:-21px;">
<div class="mbsc-sc-whl-sc" style="top: 0px; transform: ...
0
votes
1
answer
455
views
Return always false as using isSelected() in Selenium Webdriver java
I'm trying to use isSelected() method on Amazon website.
I'm trying to tick the check-box of item filter and then read the status of check-box by isSelected() but it always returns false message.
...
3
votes
2
answers
6k
views
Selenium + Java: Unable to close Advertisement in webpage
Issue I am facing:
After this step: driver.findElement(By.linkText("New Customer")).click(); an advertisement window opens and script stops here. I'm unable to close the advertisement and ...
0
votes
2
answers
529
views
How to execute multiple selenium java test-scripts with different parameter at one time?
Is there any solutions for executing multiple selenium webdriver java test-scripts having different parameters at one time and get results.
If parameter is URLs, then we can test multiple Urls on one ...
0
votes
1
answer
912
views
Type mismatch: cannot convert from WebElement to WebDriver?
Type mismatch: cannot convert from WebElement to WebDriver
Getting this error in my code why?
package testcases;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium....
1
vote
1
answer
525
views
Can we Drag and Drop multiple desktop images at the same time to web page using selenium - Java through script ingestion
I found the below article for image upload using script ingestion. But this script is working for a single file at a time but I want to drag and drop multiple files at the same time.
My client doesn't ...
1
vote
2
answers
335
views
Unable to capture the element using xpath
I'm trying to capture the dynamic code using xpath(Selenium+Java).
I want to get that code and store it in a variable, but it always returns no such element exception.
My xpath looks like below when ...
1
vote
1
answer
3k
views
Is there a free API for spell and grammar check?
I'm a QA automation engineer looking for a free API or a website for grammar and spell check to automate checks for those errors in web app using Selenium and Java.
2
votes
5
answers
99
views
Should automation scripts made in Selenium always contain wait calls?
Should the automation scripts made in Selenium always contain wait calls like implicit, explicit and fluent, or could it be that waits are not needed?
0
votes
1
answer
1k
views
How to send POST api request with the extracted details from an element using selenium+java
Use case is as below.
There is a modal in a website and it contains User ID, Name and email. I want to capture those details using selenium+java and send a POST api request with the above extracted ...
0
votes
2
answers
251
views
How to run java+selenium method continuously?
There is a functionality like in sometimes one of modal pops up and there is a button on it. If the modal pops up user needs to click on that button. This is a continuous process and I need to ...
-1
votes
2
answers
456
views
I wrote automation code to click on a date from a data picker but its not working
Website : https://www.abhibus.com/
I am trying to automate selecting date of journey on the website above. Nothing I have tried is working.
Screenshot of the date selector
Code I am using
...
1
vote
1
answer
719
views
Cucumber - Accessing injected context in After scenario hook
I'm attempting to refactor a test automation framework I have inherited (Java, Selenide, Cucumber) from one that uses static global state for test data, to context injected test data using ...
2
votes
1
answer
129
views
Is Cucumber Scenario equivalent to a Java Class?
@Add User
Scenario: Add a new User profile in the System
Given user is on the Add User profile page
Then Add a new user profile in the system
Then verify that user has been added successfully
Now, ...
2
votes
4
answers
7k
views
How to open outlook and click on the link that is there in the mail using Selenium
In my application I need to send a confirmation after which an mail will arrive to my Outlook which I need to open and click on the link which is sent in the mail.
Can someone please let me know if ...
1
vote
2
answers
170
views
how to add "\n" to the method
I have the below method:
PUBLIC methodname(WebDriver driver,formEntryMap<String,String>,String Colkey)
{
String Xpath = This will have the xpath of the input text box
inputfieldEntry(driver,...
1
vote
0
answers
1k
views
How to perform mouse hover in selenium java using page object model approach?
I have automated some test cases mentioned at https://www.techlistic.com/2019/08/automate-buy-product-using-selenium.html For second test case mentioned at given link, I have written code for mouse ...
0
votes
2
answers
879
views
I want to scroll to a specific location Selenium Java
I have a list of webelements, I have written the below code:
List <WebElement> feature_tiles = driver.findElements(By.xpath("//div[contains(@class,'featuretile')]//a"));
System....
1
vote
0
answers
100
views
NullPointerException-webdriver null
I put a screenshot with getDriverInstance.
After run.
When I run the test, I get this error.
At debug it tells me, that the WebDriver is null.
Can anyone help me with a solution how to fix the ...
0
votes
3
answers
1k
views
How to log testing results to xlsx (Excel) file with Selenium WebDriver?
I have a certain test automation script written in Java with Selenium WebDriver. Currently, I log the testing results to the console and manually copy them to the required document. Is there a way I ...
0
votes
2
answers
9k
views
Unable to import "ExtentHtmlReporter" for the java class
I'm trying generate reports for the selenium test script. but unable import "ExtentHtmlReporter" packages to the class.
added dependencies as below
<dependency>
<...
-1
votes
1
answer
914
views
Still Getting Element is not currently visible and so may not be interacted with Can some one pls give your inputs
I am getting the above error : Below is the xpath :
String MeetingTypedropdown = "//*[@id='meetingDatesForm:meetingDatesTable_data']/tr["+(i+1)+"]/td[3]//div[3]/span";
PageUtil....
0
votes
2
answers
629
views
In the screen how to navigate to the row which contains the text that needs to be Edited and then click on Edit button.Can some one pls guide.NeedHelp
In the screen how to navigate to the row which contains the text that needs to be Edited and then click on Edit button.
Scenario:
I have a screen where I need to find the row which has the value as &...
0
votes
1
answer
632
views
Getting java.lang.NumberFormatException: For input string: "517838839328"
PageUtil.clickOnButton(driver, AppXPathsConstants.UserAdminAddNewuser);
String id ="1517838839328";
String newid = "1517838839328" + (Integer.parseInt(id.substring(1,id.length()))+...
0
votes
2
answers
457
views
How to avoid errors occur as 'Unable to locate the element'?
Here I wanted to run this method properly when boolean values are false, but when running this method it always failed the test case saying "no such element: Unable to locate element".How ...
-1
votes
1
answer
327
views
How can we use WebElement.FindElement() or findElements() method on a single WebElement object, even if its a method of WebDriver interface? [closed]
I am a newbie in Selenium and Java.
Now, is this code correct. How can I call findElement() or
findElements() method on a single WebElement? I want to store text
of td[1] node.
Why are we doing ...