Can you click on a link by using Find.ByText?

May 8, 2009 at 9:47 PM

I'm trying Wax and want to click on a link with no name (unfortunalty i don't control this).  I'm able to do this with C# but I want run this with Wax via Excel.  The link is this:

<A href="javascript:submitPage('new','');" name="" alt="">New</A>

In C# with WatiN it works with this line


Is there a comparable ByText?  I get an error with it.  Or is there a Link command.

Thanks in advance.

Apr 23, 2010 at 3:03 AM

I change the code FindByHref() in FindMethod.cs.

context.Browser.Element(WatiN.Core.Find.ByUrl(new Regex(this.Value)))

you can try.