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");
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.