I'm more and more struggeling with the following problem. Depending on the testdata a different button or link is present which have to be clicked on to continue to the next teststep. When I'm waiting for button A to be clickable while button B is present the test will fail because of a Time out and visa versa.
What strategy can be used to solve this problem?
I found the following Question: Selenium Wait for anyone of Element to visible
Here the problem is solved with
Expectedconditions.or
This is available in Java but not in C#.
I tried this construction but this is not allowed in C#:
wait.Until(d =>
ExpectedConditions.ElementToBeClickable(element1) || ExpectedConditions.ElementToBeClickable(element2));
It gives the following error message: "Operator "||"cannot be applied to operands of type 'Func' and 'Func'.