--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
You are appending ${context} ("The Child Element Text is:"). Maybe you want to append ${val}.Your loop does not consider ${cnt}, only the ${val] from @{values}. Your Get Elements Texts is being assigned to ${values} (is this really a list of values?).
On Mon, Jun 27, 2016 at 6:51 PM, tim jim <theta...@gmail.com> wrote:
Hi
I am new to robot framework. I am trying to append a 10 lines of text to a file.
Here is my code
${values} = Get Elements Texts ${root} xpath=example[0]
${context} Set Variable The Child Element Text is:
${cnt} set variable ${0}
:FOR ${val} IN @{values}
\ log '${val}'
\ ${cnt} = Evaluate ${cnt} - 1
\ Append To File ${CURDIR}${/}Elements_text.txt ${context}
This is appending only 1 line. I want to have the same content as much as i want.
Please can anyone help me.
Tx
Tim
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
:FOR ${item} IN @{list}
\ Remove String #get rid of \\t
:FOR ${item} IN @{list}
\ @{result}= Split String \\n
\ appender kyeword @{result} @{new list}
appender keyword
:FOR ${item} IN @{result}
\ if ${item}!=${EMPTY} append to ${new list}