Thank you for the replies.
Adrian,
I am not sure what a throbber is so can’t say whether there is one or not.
I have added a wait for the ‘Edit’ button to be clickable and have waited as long as 120 seconds with no result and wait fails.
Kadambari,
Can you explain how to reload the element?
I don’t want to refresh the page because the application uses a lot of Ajax and the page I am on will disappear upon redisplay.
Tim
Timothy Williams <timm...@gmail.com>: Aug 29 08:40PM -0700
Hello,
Sorry for the late reply.
The problem is not accessing the element, the problem is that selenium sees
the element as still having the display:none and it tells me false when
using isDisplayed() method, but when I look at in browser dev tool I can
see the display:in-line is the current css for the element. It is like
selenium dom is not being updated to the current style of the element.
I have since noticed this with other elements on pages since moving to
Selenium 4 with Chrome versions 101 and greater..
|
Adrian <lord.s...@gmail.com>: Aug 29 09:42PM -0700
Hi,
It sounds like a timing issue.
The Save button has been clicked
And then you are testing to verify that the Edit button is displayed
And it is saying that the Edit button is not displayed and yet you can see
it is displayed.
After clicking the Save button is there a throbber that you need to wait
for?
If there is no throbber then an option would be to add a wait for the Edit
button to be clickable.
Something like:
WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("#editButton")));
Cheers,
Adrian.
|
kadambari saran <kadamba...@gmail.com>: Aug 30 11:25AM +0530
Try doing a reload of the element when the exception is thrown, using try
catch.
|
--
Thanks,
Timmer