开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜