views:

40

answers:

1

I am using WATIN Version(1.3.0)

I am in a situation that when i click on a node ,a Wizard appear. That wizard contain several controls(checkboxes,buttons and TextFields) and it has many screens(when next button is pressed , the next screen appear) but i am unable to handle it. I have apply the following techniques but failed

  1. I have used ie.HtmlDialog but exception appear
  2. I have grab the internal iframe (which is the main frame) but its HTMLDocument contains nothing. Where as i contain HTML when i look into it using IE8 Developer Tool
  3. I have tried to use mshtml.HTMLDocuemntClass but failed
  4. Wizard has url but unable to grab it by url
  5. Unable to grab it by using ie.Form

    Please HELP !!!

Thankx in Advance

A: 

Is the wizard held in an update panel or anything that is AJAX enabled? if this is then WatiN will not realise that the page has actually refreshed and will therefore not be able to find some of the elements it is looking for

Paul

PaulStack
Thankx PaulI have not made this site therefore i am not sure and developers have left the company but the wizardcontains <div id="UpdatePanel1"> tag, which means it contains update panel, right ?(In that div all the controls exists and when user click next button, other controls appear , which also exists in this Div)Now what should i do ? i mean i have to switch the tool or there is any workaround for this?
ok can you tell me if the entire page refreshes when you click the button or just the contents of the div?
PaulStack
Only the contents of the div
The wizard is a enhanced form of modal dialog, containing complete form(having header and body).
if the entire page doesnt refresh then the WatiN browser cannot "see" that the HTML has refreshed and therefore cannot find the new elements that you are looking forif you know what happen when a wizard changed window then try the .WaitUntilContainsText("text here");and it may find it. the other way would be to write a custom control that say changes to show the datetime.now.ticks value when it changes
PaulStack
Paul !!!! WaitUntilContainsText("text here") does not work and exception appear in that case. The other way is not working also :(. Is it possible to get the updated HTML and use it in WATIN ?
Actually in that wizard a seperate aspx file is referred and thats html is unaccessible
can you use pastebin.com and paste the rendered html from the first wizard step then another of the second and paste me the URLs so i can seem them and let you know?
PaulStack
http://pastebin.com/ntFQjway (Main Page HTML, in which wizard is hosted)http://pastebin.com/SvpC13mm (HTML of screen 1 of wizard)http://pastebin.com/VQrT2gMv (HTML of screen 2 of wizard)The wizard is hosted in Iframe(id = popupFrame) which exist in the main file.I have taken these HTML from Developer Tools in IE 8
try something like thisFrame mainFrame = ie.Frame("mainframe");Button btnLogoff = mainFrame.Button(Find.ByName("ContentView$PageLayout$BottomNav$btnLogoff"));
PaulStack
i am unable to understand this thing "ContentView$PageLayout$BottomNav$btnLogoff". (Could you explain it plz) Are u trying to say that if there are nested div then one has to mention every Div tag name while reaching to that element, right ?