Print Page | Close Window

How to retrieve text from a disabled textbox.

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: SilkTest @ OneStopTesting
Forum Discription: SilkTest is an automation tool for testing the functionality of enterprise applications in most versions of Windows, Sun Solaris 9 & 10, and Red Hat Enterprise Linux WS 2.1 & 3.0.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=1007
Printed Date: 31May2024 at 5:29am


Topic: How to retrieve text from a disabled textbox.
Posted By: Ambika
Subject: How to retrieve text from a disabled textbox.
Date Posted: 26Apr2007 at 9:59pm
Hi,

I have a textbox control in my htmlpage where it is disabled by default. When I tried to retrieve the text it throws as its is not enabled.
Below the control status and error text. Please let me know how to retrieve the text from that control

[ ] Exists TRUE
[ ] isEnabled FALSE
[ ] isVisible TRUE
[ ] isActive TRUE
[ ] *** Error: Window '[HtmlTextField]Current Time|[HtmlTextField]#1|[HtmlTextField]$currenttime' is not enabled
[ ] Occurred in Ctrlr.Commands.SetTime.txtCurrentTime.GetText
[ ] Called from ControllerCommandSetTime at controller_command_set_time.t(49)



Replies:
Posted By: Chandana
Date Posted: 27Apr2007 at 2:59am
Hi

Use these lines before and after ur code..

1) Agent.SetOption(OPT_VERIFY_ENABLED, FALSE)

Agent.SetOption(OPT_VERIFY_ENABLED, TRUE)

Other wise goto

2) Options -> Agent -> Verification TAB

Uncheck the box verify the propetties of window..

3) Verifyproperties method is also working on that..




Print Page | Close Window