On Monday, February 2, 2015 at 2:35:24 PM UTC-8, praneetha pagidimarri 
wrote:
>
> Hi,
>
> I've to validate the value of a disabled dropdown on a page.
> I used an instance variable to read all the values and used as .text to 
> validate against the page values.
>
> Fields which are in enable mode and are text are showing accurate results, 
> but fields which are in disabled mode with values in dropdown boxes are not 
> validated.
> Can any one suggest on this issue please.
>

can you provide sample HTML?  

Forms that have fields that can be enabled and disabled according to other 
values often have a lot of JS code that processes things as fields are 
changed and also when the form is submitted.  So potentially a field could 
be set to a given value by the user, then later disabled when another value 
is changed.  and inspecting the value in that field at that time tells you 
very little

For example say that a form had a checkbox for 'use custom timeout' and a 
timeout value field that was enabled when the checkbox was checked. The 
user might be able to enable the checkbox, enter a value, then disable the 
checkbox, leaving the value they entered just sitting there grayed out.  

  In that case when the form is submitted, the JS code could decide to omit 
that field entirely, or send a default value.  Or it might just send 
everything, and depend on code on the back end to know it should ignore the 
custom timeout value when custom timeout is not enabled.  Without knowing 
exactly what the thing is SUPPOSED to do, where the logic is, trying to 
verify the 'current' value of the field before submitting the form won't 
tell you if things are working right or not..  Instead you might likely 
need to monitor the HTTP traffic to see what really got sent, or inspect 
what data was saved at the back end after the form was submitted.   you 
could do that by inspecting some 'settings' page in the app that displayed 
the values, or maybe by hitting the DB directly to validate the right 
things were persisted. 

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to