Questions tagged [selenium-java]

95 questions
0
votes
0 answers

ITestResult Success/Failed/Skip Counts different from count in TestSuite

I have a method called in my @AfterMethod in TestNG attempting to gather the counts of tests passed/failed/skipped, and in @AfterSuite printing out the counts. This also includes setting custom extent report status. When I run the Test Suite, I am…
wheelerlc64
  • 435
  • 2
  • 5
  • 17
0
votes
0 answers

How to use Selenium to fill a form field - input vs__search

enter image description here driver.findElement(By.xpath("//*[@id="myModal"]/div/div/div[2]/div/div[1]/div/div/div/div[1]/input")).sendKeys("Andre Felipe"); I use the code above to fill in the field but it stays fixed. I've tried simulating a click…
0
votes
4 answers

I'm getting an error while hovering over the object and hence the automation script is failing

I have written a simple Selenium-based automation script for a login page. But I have a separate class for page objects and methods, another class for reusable components, and then the test class. Page objects and methods public class LoginPage…
0
votes
0 answers

Script is failing from Jenkins due to difference in screen size - Chrome Browser

I am working on running Selenium(Serenity) scripts in Jenkins. Here, my browser window size which is 1920x1080 px resolution and chrome version is 114.0.5735.199. The script is working as expected in locally but not from Jenkins. I have tried the…
Borra Suneel
  • 196
  • 1
  • 2
  • 6
0
votes
1 answer

Selenium program not running without static wait

There was another StackOverFlow question for which I had to write a program. My program was not working at all. The program is working fine when we debug it. It's failing at other times. I assumed that it could be due to sync issues. So, changed all…
Ahamed Abdul Rahman
  • 512
  • 1
  • 5
  • 18
0
votes
2 answers

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: console.error: JsonSchemaValidator.jsm:

When I execute a Selenium Script using Firefox, the Firefox opens up but it doesn't redirect to the URL. Below is the error which is displayed on the Eclipse Console: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host…
0
votes
2 answers

Invalid session id when running selenium framework in parallel mode

I get the following when running my Selenium framework in parallel mode using TestNG. org.openqa.selenium.NoSuchSessionException: invalid session id The issue only happens in parallel mode and when it runs in serial mode I have no issues what so…
0
votes
2 answers

RestAssured Multipart - Concatenate multiple multiPart values into a single value

I am having multiple API tests which have different sets of multipart input values which vary dynamically, I want to create 1 common function which can accept these varying multiple multipart into a single multipart line so that I don't have to…
Automation Engr
  • 444
  • 2
  • 4
  • 26
0
votes
1 answer

Why can't I get the stored String Object in the ThreadLocal outside the class where it defined?

I am trying to get the stored String Object in ThreadLocal in my BaseClass to the TestClass. In the following code I have defined the ThreadLocal and stored a String by set() method. But when I try to get that stored string in my TestClass that…
0
votes
1 answer

How to avoid "NullPointerException" while referencing the driver from ThreadLocal to Test Class?

I am trying to get the driver that was set in the ThreadLocal in the "BaseTest" class to my Test class "T001_LoginTests_Check" while creating an object of my Page class "HomePage_Check". I am passing the driver through the constructor defined in the…
0
votes
2 answers

How to Select first enable date in calendar in selenium without hard coded any value?

How to Select first enable date in calendar in selenium java without hard coded any value and if enable date not available in current month then how we will move to next month and select first enable date. accepting to select first enable date only
0
votes
0 answers

Able to View screenshot images in Extent reports locally but not in Jenkins published extent html file

Currently I am able to see my *.png files in my local directory and when opening my extent report html, I can see the screenshots. When I do the same in Jenkins and use the publish html plugin for the extent html report while also moving the *.png…
0
votes
0 answers

How do I use common login for my selenium java project wise

My web application is login based - So every time I need to login to the tool and before I do operation in the tool. I create a method for login operation, and when I am trying to call that login method login operation in another test script login…
0
votes
1 answer

Can I shift to 1 machine(higher config) with 2 nodes than 2 machines(lower config) each with 1 node in selenium grid?

I am using 2 windows VMs each with 2 CPU cores and 8GB RAM each and my tests run Ok so far using selenium grid. Here I run 7 instances of chrome parallelly distributed over these 2 machines, means 1 machine may have 4 instances of chrome and another…
0
votes
1 answer

Not able to close advertisement popup

public class MakeMyTrip { public static void main(String[] args) { WebDriverManager.firefoxdriver().setup(); WebDriver driver = new FirefoxDriver(); driver.manage().deleteAllCookies(); driver.manage().window().maximize(); …