Is there an easy way to retrieve attribute values in code

2 posts, 0 answers
  1. S
    S avatar
    15 posts
    Member since:
    May 2011

    Posted 01 Jun 2011 Link to this post

    I am trying to verify that a field contains the current date.  I saw an example on your website where someone used code to retrieve the InnerText of an element, unfortunately I can't get to the text using the innerText field, instead the date field is available in the element attribute labled "Value".

    I've tried various variations of el.attribute.item("value).value or el.attribute.item(3).value but nothing I've tried seems to work, if anyone has an example of vb code I would appreciate it.  Also, is it  possible to use telerik tools to extract the value of a field in step A and then use that extracted value in coded step B? The video on your website doesn't make it clear if extracted values can be used in code. 

    Thanks again for your help
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 02 Jun 2011 Link to this post

    Hello S,
        yes, you can use extracted values in code quite easily. For instance let's say you have an extract step as seen in screenshot 1. This step stores its extracted value in a variable ModalWindowsH1Tag. You can access it in code like this:
    String myExtractedValue = GetExtractedValue("ModalWindowsH1Tag");

    All the best,
    Stoich
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top