1

I am using selenium IDE for writing test case and I am trying to extract content in value attribute of below tag

<div id="inputcontainer_f-5" class="FGIC" style="max-width:none;"><input type="text" autocomplete="off" name="f-5" id="f-5" class="dummyclass FastEvtFieldFocus" value="TEXT_I_WANT_TO_GET" readonly="readonly" spellcheck="true" tabindex="-1" style="">
</div>

My selenium IDE code

comment    | Target                   | value
store text | xpath=//input[@id='f-3'] | EXTRATCED_CONTENT
echo       | ${EXTRATCED_CONTENT}

Result : I am getting empty string

echo : ""

If i try to change the xpath as xpath=//input[@id='f-3']/@value I am getting following error

storeText on xpath=//input[@id='f-5']/@value with value EXTRATCED_CONTENT Failed:
The result of the xpath expression "//input[@id='f-5']/@value" is: [object Attr]. It should be an element.

How do i extract and store TEXT_I_WANT_TO_GET in variable EXTRATCED_CONTENT and echo it

Thanks Jk

1 Answer 1

0

Try this below.

//input[@id='f-3']@value
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.