开发者

With Watin, how do I wait until an element gets a certain CSS class?

开发者 https://www.devze.com 2023-04-06 21:40 出处:网络
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?

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

精彩评论

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