In leading software testing solutions providers a basic and simple approach is followed to handle and avoid such failures.
Below are the steps that can help you fix this issue
Parallel Execution needs to be thread safe.
If we are using action class then we can use other way to click like Java script execution etc.
What you are wanting to achieve in verifying an email in Outlook is considered an anti-pattern in Selenium.
A lot of people think you can and should automate everything, when there are plenty of situations where automation doesn't make sense.
Take a look at the Selenium documentation where it states:
For multiple reasons, logging into sites like Gmail and ...
creating multiple Jenkins jobs with different regression.xml files pointing to them
If each Jenkins job runs the test command but pointing to different tests then each should be spinning up its own WebDriver/Browser instance so the ElementClickInterceptedException might mean your app is in a different state than what the test code assumes. It's common that ...
I found the solution for this. It might help others.
To fix this issues I checked the Maven dependencies. After adding dependencies in Pom.xml, it is not downloading the related dependencies. (It showing that it's downloading but it's not showing in the maven dependencies.)
So I added the external Jar files related to the extent report cucumber adapter 6 in ...
Using the same webdriver for all tests in parallel execution defeats the purpose of concurrency. When you are using the same webdriver for two parallel tests, then webdriver calls will overlap for both tests.
So the execution flow will go like, webdriver will execute some steps for test-1 followed by some steps for test-2, then again some steps for test-1.
Add the following lines to the end of your code:
ReportGenerator generator ...
What, @Daniel said would be less lines of code but you can start with an array of elements
WebElement foo = driver.findElements(...);
Then get the last element in that array
WebElement bar = foo.get(foo.size-1);
You might wanna take a look at the last-of-type css selector property (https://developer.mozilla.org/de/docs/Web/CSS/:last-of-type). That way, instead of having the overhead of finding every element, labeling them for your selenium hub, allocating space for all the elements in the RAM and then throwing them away you could do a simple driver.findElement(By....
The error message is itself very self-explanatory. Your plugin definition is wrong. This
should not be in plugin. As the error message itself states, the valid values are
Valid values for PLUGIN are: default_summary, html, json, junit,
message, null_summary, pretty, progress, ...
I think its because, you are defining loadmoreElems (within the loop) after you perform the click operation. So it click on the Load More button one time because you have defined loadmoreElems outside the loop. After the 1st click you are not defining it before click operation and the previously defined loadmoreElems is no longer valid.
Define it before that ...
With what you are attempting to do, you should be using a loop structure.
I'd recommend something like this (no guarantees on the code - I haven't worked with Java in over 20 years):
WebElement loadmore = getFluentWaitElementByXPath(loadmoreXpath, 20, driver);
// assuming "loadmore" is the button to click
// also we need to wait until the extra ...