English 中文(简体)
是否有办法在Watin的另一儿童要素中选择儿童要素
原标题:Is there a way to select a child element inside another child element in Watin
  • 时间:2011-04-14 15:59:39
  •  标签:
  • watin

我试图在形式上选择一个环节/但又一个部分。 这样做的方式是,有两种相干的连接/布局、名称等。 然而,它们有不同的形式,因此希望使用的守则是:

•my.Form(Find.ById(“PermissionsForm”),Child(Find.ByClass(“saveBtn”)。 儿童(Find.ByText(“SAVE”));

希望得到任何帮助。

问题回答

我认为这是你需要的:

var button = _myTest.Form("PermissionsForm").Button(Find.ByClass("saveBtn"));

这将研究除此类别外的纽芬兰语 Btn in the form grantedsform in You browser instance -my.

查阅page,以决定您是否需要在html上使用的标签基础上拥有Button(.)或Link(...)。

如何为这一要素建造一个栅栏?

Regex could something like this Regex elementRe = new Regex("id=LnkOk href="http://stackoverflow.com");

然后,你可以把你的法典用在Click中。 如果Click方法尚未采用,则可以将其扩大到接受Regex。

Let me know how this goes or if you need more info. Cheers, DM





相关问题
Hide all windows for a process (ex. Internet Explorer)

I am using WatiN to script actions in Internet Explorer that run in the background of the user s machine. (I know...hacky). I am able through WatiN to make the Internet Explorer window not show. ...

WatiN - getting past the certificate error page

Anyone know how to use CertificateWarningHandler in WatiN? I ve got as far as... IE ie = new IE("https://mysite.aspx"); CertificateWarningHandler cwh = new CertificateWarningHandler(...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Can WatiN disable JavaScript in IE?

I want WatiN to disable JavaScript for some of my tests but can t find any obvious way to do it. Is it possible? I am using IE specifically. Thanks in advance, Ciaran

What is the best way to crawl a login based sites?

I ve to automate a file download activity from a website (similar to, let s say, yahoomail.com). To reach a page which has this file download link, i ve to login, jump from page to page to provide ...

热门标签