Validating data displayed in a read-only textfield
Page 1 of 1 • Share •
Validating data displayed in a read-only textfield
Does anyone have a solution for getting the value of a textfield that has enabled=false (read-only), but is displaying either a date of last action, or 'None' for the case that the action hasn't been performed.
This is one of the final sticking points for conversion to a Selenium RC based test automation solution.
I haven't been able to find a solution on the web. WatiN gives the capability of getting the value of the textfield even if disabled.
Thoughts anyone?
Thank you
btw - VerifyValue works with Selenium IDE, but I need a solution for RC.
This is one of the final sticking points for conversion to a Selenium RC based test automation solution.
I haven't been able to find a solution on the web. WatiN gives the capability of getting the value of the textfield even if disabled.
Thoughts anyone?
Thank you
btw - VerifyValue works with Selenium IDE, but I need a solution for RC.
Last edited by keithrw on Thu Jan 27, 2011 6:10 am; edited 1 time in total (Reason for editing : more info)
keithrw- Posts: 2
Join date: 2011-01-25
Re: Validating data displayed in a read-only textfield
Hi,
you can do this with the help of storeAttribute command and firebug. with the help of firebug you can get id of the disabled text field. after that use the following command:
bye
you can do this with the help of storeAttribute command and firebug. with the help of firebug you can get id of the disabled text field. after that use the following command:
- [info] Executing: |storeAttribute | text1@value | temp |
- [info] Executing: |type | text1 | ${temp} |
bye
Re: Validating data displayed in a read-only textfield
Unfortunately, it looks like the answer given is for Selenium IDE, which works.
When you try to use .Net C# code to do the equivalent
string result = selenium.GetAttribute("txtPhoneHome@value");
you get
NightlyAutomation.ApplianceTestFF.AutomatedFFTest_UpdateManager_AvailableUpdates:
Selenium.SeleniumException : ERROR: Could not find element attribute: txtPhoneHome@value
Selenium RC is finding the element, but only using its version of the HTML to find the attribute, which does not contain a value field because of the disabled=disabled attribute (I'm attaching firebug's HTML)
<input type="text" name="PhoneHome" disabled="disabled" class="txtPhoneHome" id="txtPhoneHome">
Firebug's DOM tab however shows the needed
value: "None"
I'm not sure why Selenium RC doesn't seem to be able to expose the value attribute
Thank you,
Keith
When you try to use .Net C# code to do the equivalent
string result = selenium.GetAttribute("txtPhoneHome@value");
you get
NightlyAutomation.ApplianceTestFF.AutomatedFFTest_UpdateManager_AvailableUpdates:
Selenium.SeleniumException : ERROR: Could not find element attribute: txtPhoneHome@value
Selenium RC is finding the element, but only using its version of the HTML to find the attribute, which does not contain a value field because of the disabled=disabled attribute (I'm attaching firebug's HTML)
<input type="text" name="PhoneHome" disabled="disabled" class="txtPhoneHome" id="txtPhoneHome">
Firebug's DOM tab however shows the needed
value: "None"
I'm not sure why Selenium RC doesn't seem to be able to expose the value attribute
Thank you,
Keith
keithrw- Posts: 2
Join date: 2011-01-25
Similar topics» Please read and sign rules
» PLEASE READ ALL Mig33-gang FORUM MEmBErs
» 3110 data blk error
» MCX IEOD DATA MAY 2012
» EEPROM DATA FILES,UNIVERSAL TV BOARD
» PLEASE READ ALL Mig33-gang FORUM MEmBErs
» 3110 data blk error
» MCX IEOD DATA MAY 2012
» EEPROM DATA FILES,UNIVERSAL TV BOARD
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

» sample webdriver code for php users
» which standalone server to use
» Dynamic Drop Down Selection
» It is possible to find list of all URL's exist in any web page in selenium ide
» It is possible to compare 2 same images in selenium IDE.
» how to compare 2 ULR's which is exist in same web page (View page source).
» Web Driver: Unable to click a link present inside the frame of a frameset
» Help me to get dynamicaly loaded options of dropdown in Selenium RC -Junit test case