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

Information I type on screen isn't recorded by Test Studio

4 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 26 Aug 2011, 09:49 PM
I am trying to write text to an element that has a tagname of body.  The problem is that the element is defined by Test Studio as an HTML Control which means that I do not have access to it's Innertext/TextContent properties. Do you have any suggestions how I might be able to gain access to a body's InnerText property.

Thank You

4 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 29 Aug 2011, 03:02 PM
Hi Mark,   
    you probably need to type into an element contained within the the body element.

The body tag is part of the standard definition of an HTML Page:
http://www.w3schools.com/tags/tag_body.asp
It's not a real element per se - it's a container.

It's true that we record clicks on HTML body elements but not typing. However, I don't think there's an actual need to do that. Please recheck whether it's the actual body element that you need to type into or you're typing into something contained within the body tag. Please give me some additional details on your use case.

All the best,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Mark
Top achievements
Rank 1
answered on 29 Aug 2011, 06:01 PM
I appreciate your suggestion, but unfortunately to accomplish what I need on the particular page that I am working on, I need to use the body tag (the only other option listed beneath the body tag is a paragraph tag - and that tag is also defined as an HTML Control which means that I don't have access to the InnerText property for that tag either.)  If I edit either of these elements, their InnerText values are visible - can you suggest any method I could use to make changes to these values?

Thanks
0
Cody
Telerik team
answered on 30 Aug 2011, 11:57 PM
Hello Mark,

It sounds like you are dealing with some sort of advanced Rich Text Editor type of control, is that true? Usually controls like these are using JavaScript to intercept each and every keystroke, like a smart word processor, and then updating the HTML as it processes the keystrokes.

In such cases as these you must use a coded step to simulate keyboard typing like this:

Manager.Desktop.KeyBoard.TypeText("String to be typed", 10, 10);

I hope that helps.

Kind regards,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Mark
Top achievements
Rank 1
answered on 31 Aug 2011, 01:42 PM
Thanks, that seems to have solved the problem.
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Mark
Top achievements
Rank 1
Cody
Telerik team
Share this question
or