0

I am attempting to find an element using this code:

try
{
new WebDriverWait(wdriver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists(By.Id("messageGrid_TL")));
                Console.Out.WriteLine("Grid: Loading element exists");
            }
            catch (Exception)
            {
                Console.Out.WriteLine("Grid: Loading element does not exist");
            }

I tried all methods like ElementExists, PresenceOfAllElementsLocatedBy etc.,
but Standard Output is still "Grid: Loading element does not exist".
I tried to find the element by

//*[@id='messageGrid_TL']
//*[@id='messageGrid_LPV']
"//span[text()='Loading...']"

enter image description here
enter image description here enter image description here enter image description here

Element is displayed on the page only for a few seconds.
Note: I don't call the loading panel from the app code, but DevExpress does it itself, when the grid is refreshed/loaded, it generates the loading panel.
Can you advise me how to find this element, please?

0

1 Answer 1

0

Handling devExpress grids can be quite challenging, Have a look into Awaitility, it handles devexpress loading a lot better than just explicitly waiting, if you dont want to use awaitility you can also create a method to wait for the element to display and if the element displays wait for it to disappear, I can send a code snippet if you need.

1
  • Can you send a code snippet, please?
    – Majkl
    May 18 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.