Disabled or Read-only textbox

4 posts, 0 answers
  1. QA
    QA avatar
    16 posts
    Member since:
    Mar 2011

    Posted 23 Jan 2012 Link to this post

    Hi,

    How can I extract or verify data from disabled or read-only textbox?

    1) I cannot even extract or verify the data on disabled field
    2) I tried to extract and also verify the data on read-only field but the it fails with the following error while executing the test

    '1/23/2012 1:53:30 PM' - 'Fail' : 42. Verify TxtRemainingAmountWorkingReceiptTextbox's text content Same '120.00'------------------------------------------------------------Failure Information: ~~~~~~~~~~~~~~~[Silverlight Extension Error] Details: ArtOfTest.WebAii.Silverlight.NoSuchPropertyException: Property 'Text' does not exist on the element at Telerik.TestingFramework.XamlExtension.ClientServices.GetRealProperty(AutomationReference reference, AutomationProperty property) at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command)InnerException:ArtOfTest.WebAii.Silverlight.ExecuteSilverlightCommandException: [Silverlight Extension Error] Details: ArtOfTest.WebAii.Silverlight.NoSuchPropertyException: Property 'Text' does not exist on the element at Telerik.TestingFramework.XamlExtension.ClientServices.GetRealProperty(AutomationReference reference, AutomationProperty property) at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command) at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd) at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetProperty(AutomationProperty property, IAutomationPeer peer) at ArtOfTest.WebAii.Silverlight.AutomationObject`1.GetProperty(AutomationProperty property) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.PropertyVerificationDescriptor.GetProperty(FrameworkElement element, String propertyName, Type propertyType, String attachedPropertyOwner) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.PropertyVerificationDescriptor.ExtractData(IApplication hostApp, DescriptorValueStore dataStore) at ArtOfTest.WebAii.Design.Extensibility.XamlVerificationDescriptor.ExtractData(IAutomationHost targetHost, DescriptorValueStore dataStore) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)


    Thank You,
    Dipti

  2. Anthony
    Admin
    Anthony avatar
    19 posts
    Member since:
    Sep 2012

    Posted 24 Jan 2012 Link to this post

    Hello Dipti,

    I am unable to reproduce this issue. See screen shot 1 for a test I created against a public Silverlight site. After navigating to the site, I clicked "DataForm" in the left-hand menu. I then targeted the "Cancel" button element (screen shot 2).

    Notice that the Text Verification and Extract steps are targeted against the child TextBlock element within the Button, whereas the "Verify IsEnabled Equal False" is targeted against the parent Button element itself.

    If you continue to have difficulty, please point me to a public site where I can replicate the issue.

    Regards,
    Anthony
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  3. James
    James avatar
    26 posts
    Member since:
    Oct 2008

    Posted 27 Jun 2012 Link to this post

    Hi Anthony,

    I am using WebAii Testing Framework for test automation of Silverlight Web application.
    Our environment is :

    • Silverlight 5, 
    • Telerik_Testing_Framework_2012_1_528_FREE_EDITION 
    • .NET 4
    • IE-9

    I have a read only TextBlock and trying to read the text using
    TextBlock.Text
    But this line throws following exception. TextBlock is Visible & clickable.

    Source: ArtOfTest.WebAii, 
    Message: [Silverlight Extension Error] Details: ArtOfTest.WebAii.Silverlight.NoSuchPropertyException: Property 'Text' does not exist on the element
       at Telerik.TestingFramework.XamlExtension.ClientServices.GetRealProperty(AutomationReference reference, AutomationProperty property)
       at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command), 
    Stack Trace:
       at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
       at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetProperty(AutomationProperty property, IAutomationPeer peer)
       at ArtOfTest.WebAii.Silverlight.AutomationObject`1.GetProperty(AutomationProperty property)
       at ArtOfTest.WebAii.Silverlight.UI.TextBlock.get_Text()


    Could you please help me with this exception?

  4. Anthony
    Admin
    Anthony avatar
    19 posts
    Member since:
    Sep 2012

    Posted 28 Jun 2012 Link to this post

    Hello James,

    I am not able to reproduce that error on a public Silverlight site:

    Settings.Current.Web.EnableSilverlight = true;
    Settings.Current.Web.SilverlightConnectTimeout = 60000;
    Manager.LaunchNewBrowser();
     
    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
    TextBlock tb = app.Find.ByTextContent("Welcome to the Silverlight Toolkit").As<TextBlock>();
     
    Log.WriteLine("Text: " + tb.Text);

    Please provide sample code against a publicly accessible site so I may see your issue first-hand.

    Kind regards,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings

Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!