I beleive that if there are 2 elements with the same name ( or maybe its 
id - check the docs) IE will return a collection, but if there is only one, 
it returns a single element.

This has caused me numerous problems in the past.

But why would watir cause it... I really cant say. It certainly shouldnt be 
changing anything on the page, just accessing what is there

Paul


----- Original Message ----- 
From: "Federico Vela" <[EMAIL PROTECTED]>
To: <wtr-general@rubyforge.org>
Sent: Thursday, February 15, 2007 2:08 PM
Subject: Re: [Wtr-general] VBScript Fails with Watir


> Hello,
>
> With the help of my coworkers, I've made some progress in identifying the 
> problem.
>
> [b]It is definitely a type conversion error.[/b]
>
> I should clarify that this is an intranet web application that only 
> supports IE, that is the reason why VBScript is acceptable.
>
> Anyway, i changed my vbscript to test it in the following way:
>
> Dim strInitialDate
> Dim strFinalDate
>
> window.alert(TypeName(document.all("txtInitialDate")))
> strInitialDate = document.all("txtInitialDate").value
> strFinalDate = document.all("txtFinalDate").value
>
> The first time I run the page with Watir, and the window.alert produces 
> the following:
> DispHTMLElementCollection
>
> Without closing the browser window, i wait for Watir to fail and shutdown. 
> then i manually click on the image and i get:
> HTMLInputElement
>
> Therefore Watir is producing a DispHTMLElementCollection when performing 
> the click, but when clicking manually the correct HTMLInputElement is 
> generated.
>
> Any way around this with this new information???
>
> Thank you.
>
> Best regards,
>
> fedevela
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=6554&messageID=18753#18753
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to