tags:

views:

162

answers:

1

Hi

I'm working on WatiN tool. I've scenario where i need to check a checkbox and click on ok button in the popup window. i've used AttachtoIE method and used URL attribute to attach to the popup window. Now the problem is URL contains the ID value, which changes each time the popup appears.. so how to handle this or is there any other method other than AttachtoIE. please give some suggestion

thankingyou

A: 

Hi,

You can use Find.ByUrl(neww regex("some regexe expression")) to ignore the id part. Or if you are sure that you have just one IE instance open before the popup is opened, attach to to the IE instance which has not the same URL as the browser you opened the popup from.

HTH, Jeroen

Jeroen van Menen