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

5 posts, 0 answers
  1. Mark
    Mark avatar
    10 posts
    Member since:
    Dec 2006

    Posted 26 Aug 2011 Link to this post

    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
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 29 Aug 2011 Link to this post

    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!
  3. Mark
    Mark avatar
    10 posts
    Member since:
    Dec 2006

    Posted 29 Aug 2011 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 30 Aug 2011 Link to this post

    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!
  5. Mark
    Mark avatar
    10 posts
    Member since:
    Dec 2006

    Posted 31 Aug 2011 Link to this post

    Thanks, that seems to have solved the problem.
Back to Top