如何要等到文本框在华廷启用 [英] how to wait until the textbox enable in watin

查看:78
本文介绍了如何要等到文本框在华廷启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框我的负载事件文本页面上是禁用的10那么它的启用
所以如何等待在华廷10秒。
我是尝试这个code

i have one textbox on my page on the load event textbox is disable for 10 then its enable so how to wait for 10 sec in watin. i am try to this code

IE ie = new IE("http://localhost:2034/WebForm3.aspx");
         ie.ShowWindow(WatiN.Core.Native.Windows.NativeMethods.WindowShowStyle.Maximize);
         ie.TextField("TextBox1").TypeText("Fer");

但它给出了TextBox1中是禁止所以我要等待一段时间的误差。
因此,如何做到这一点?
请大家帮我?

but it gives the error that TextBox1 is disable so i want to wait for some time. so how to do this? please help me?

推荐答案

您可以试试这个...

You could try this...

ie.Element("TextBox1").WaitUntil<Element>(element => element.Enabled);

这篇关于如何要等到文本框在华廷启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆