With Watin, how do I wait until an element gets a certain CSS class?
I want to use Watin's WaitUntil
method to wait until an element gets a certain CSS class (JavaScript adds the class dynamically). How do I do this?
var element = browser.Div("my-div")开发者_StackOverflow;
element.WaitUntil(...); // What to do here??
Try one of these:
element.WaitUntil(Find.ByClass("your_class_name"));
element.WaitUntil(d => d.ClassName == "your_class_name");
Keep in mind, that element with class="your_class_name other_class_name"
will probably (I'm not 100% sure) not be found.
精彩评论