This is a migrated thread and some comments may be shown as answers.

Unable to verify TextContent of a textarea in Chrome

5 Answers 575 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Charlene
Top achievements
Rank 1
Charlene asked on 18 Mar 2013, 10:10 PM
Hi,

I have a line in my test - "Verify 'TextContent' 'Contains' '#Supp Name' on 'SearchValueTextArea'" that is passed in IE and failed in Chrome.

In Chrome, I entered text "#Supp Name" in the text area and I inspect the element 'SearchValueTextArea' , this is what I see

<textarea id="SearchValue" placeholder="Search" rows="1" cols="20" class="initialisableControl clearabletextarea initialised" data-t1-control-type="Placeholder" style="overflow: hidden; height: 16px;"></textarea>

As you can see, the value "#Supp Name" is not captured.

Whereas the same test in IE, I see below in the F12 Dev Tools  

<textarea class="initialisableControl clearabletextarea initialised placeholdized placeholderHidden" id="SearchValue" style="height: 16px; overflow: hidden;" rows="1" cols="20" data-t1-control-type="Placeholder" placeholder="Search">
        Text - #Supp Name

I tried others Attribute verification e.g. OuterMarkup/ Inner Text but it is still not working.

I talked to our developers. He advised that I might be able to get around by doing something like "SearchValueTextArea.value()". May I ask if you have any other solution rather than writing a line of code in my test script?

Please advise. Thank You.

5 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 21 Mar 2013, 12:09 PM
Hello Charlene,

I am sorry to hear you are experiencing this issue.
The non-coded way to proceed with verification is to use our Advanced Test Verifications as shown in this article.
Regarding the test area you are trying to verify is it possible to provide us with access to the application you are testing so we can take a look. If this is appropriate please note that you are currently posting in public available forum and the information provided is not confidential. If you are going to provide some sensitive information I can advise you to open a support ticket instead. 
If you are not able to provide us with access screenshots of both browsers with the element inspected?

Looking forward to hearing from you.

Greetings,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Charlene
Top achievements
Rank 1
answered on 24 Mar 2013, 09:29 PM
Hi Ivaylo,

Thank for your reply.

Attached are the screenshots for both browser with element inspected. 

Thank You.

0
Ivaylo
Telerik team
answered on 27 Mar 2013, 12:49 PM
Hello Chalrene,

Thank you for providing the screenshots.
However it seems that the text value is not present in the DOM of the Chrome browser and this is an expected behavior. This is browser specific and we do not have control over it. 
If you are able to provide us with access to the application you are testing and instructions on how to get to that portion we can investigate this issue further. Please note that you are writing in a public forum post and the provided information is not confidential, you can submit a support ticket instead where all the info remains private.

Greetings,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Maria
Top achievements
Rank 1
Iron
answered on 05 Nov 2022, 12:45 AM
Did this question ever get answered?  I'm trying to verify the textcontent of a TextArea element.  However, the recorder is not able to capture it.  Is there I way I can do the verification through a coded step?
0
Plamen Mitrev
Telerik team
answered on 07 Nov 2022, 09:30 AM

Hi Maria

The TextArea element does not expose its text content directly in the DOM tree and it is not possible to get it directly from there. However, Test Studio provides different ways for you to verify that the content of the TextArea element is correct. 

One of the ways is through the text from image step, that will try to get the content as text and build a verification for you. Another approach is to verify the entire image of the TextArea and compare it as an image during test execution. I tested both suggestions against this demo page. Please explore them on your end against the application that you want to automate. 

I hope this helps!

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
General Discussions
Asked by
Charlene
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Charlene
Top achievements
Rank 1
Maria
Top achievements
Rank 1
Iron
Plamen Mitrev
Telerik team
Share this question
or