How to add space in Txt file using robotframework - robotframework

${response14} Get WebElements xpath=// [#id="com_ibm_team_rtc_foundation_web_ui_views_ArtifactListView_4"]
Log ${response14}
${txt1}= Get Text ${response14}
create file ${file2} ${value_1}${txt}${value_11}${txt1}
Log ${txt1}
Here I want to store the value of ${value_1}${txt}${value_11}${txt1} in different lines in text file.
I am able to store all the values in a paragraph, but i don't want that, i need to store in different lines, How do I do this in robot framework

You can insert newlines using \n:
create file ${file2} ${value_1}\n${txt}\n${value_11}\n${txt1}

${CreatingFile} = Create File ${EXECDIR}/data/file.txt
Log to Console

Related

How to verify text but except some text in line using robot framework

I have to verify text that present on web page but in the text line have dynamic wording that I don't know how to verify this situation.
Wait Until Element Contains &{verScript}[Script] Test automate for 50,000 time timeout=60s
I want to verify text "Test automate for 50,000 time" but 50,000 is dynamic value. I don't want to verify 50,000 in this locator and can it whatever for this value in line.
Can any help me please.
using set
#{queryResultsA}= split string Test automate for 50,000 time
#{queryResultsB}= split string Test automate for XX,XXX time
${z} = Evaluate (set(${queryResultsA}) - set(${queryResultsB}))
## here ${z} will be 50,000
Using keyword
will return all lines on the page which are matching given string. the following keyword will return Lines as one string concatenated back together with newlines
Get Lines Containing String Test automate for
for more keywords
which match partial and full text/strings
using regex and pattern matching

Terminal of unix can be without square brackets

Can i make look like root#arch$.
Instead if [root#arch~],
I don't like square braces.
Help me if you know i want to remove square[] bracess.
The prompt you're talking about is named PS1, and you can customise its appearance in your .bashrc file.
So edit that file and add something like the following:
PS1="\\u#\\h:\\w"
The next time you log in you should have your new appearance.
PS1="\[\e[1;31m\]\u\[\e[0;15m\]#\\h \\w "
Insert the above code in '~/.bashrc' file, whenever you open a terminal '~/.bashrc' file will be executed hence you get custom prompt.
Tinker with numbers above to get desired colors.

i want to create a file with the system date in another directory and copy some data into it. Unix

I want to create a file with system date in another directory and copy data difference of two files into it.
NOW=$(date +"%H_%D")
file="log_$NOW.txt"
diff tmp1.txt tmp2.txt > $temp/log_$NOW.txt
i am using above code. But file is not getting generated. Apart from it if i create a file with simple name i.e without using $NOW the file is getting generated. Please help me.
The format string to date produces something like 16_12/03/13. This contains directory separators so the filename becomes invalid. Instead use dots to separate the date:
NOW=$(date +"%H_%m.%d.%y")
which should produce strings like 16_12.03.13

How to save SQLPLUS output to text file without buffer line?

There are some related questions, but specifically do not answer my question specifically on how do you control the output of SQLPLUS queries so that it outputs all the result sets to a text file, without the buffer line, by that I mean what's held in the buffer when you use the SAVE command. For example, it's usually the first line, with a "SQL>" prompt followed by your SQL statement. How do you completely REMOVE that line and simply output (using SPOOL I presume) to a text file?
The SQL > line won't be output if you connect silently with sqlplus -S schema/pw#db

How To convert Simple Word to Sphinx4 WSJ like Dictionary Prounounciation?

I Have Just Gone Through to this Sphinx4 Speech Recognition,I had implemented it with the helloworld demo of sphinx4,
Now What is Want is To create A dynamic dictionary For the text file given as input,
Right now What i need to do is just create a text file and uplaod in IMTOOLS and then They provide me a .Dict File.
But My requirement is like as the user Type any text in textbox and click a convert button then it automatically convert that word in to WSJ Dcitionary like prounounciation Words,\ E.G. User Type in textbox with the word he want to recognize Let say its a " ANKIT" then it automaticaly convert that word in to wsj dicionary like format as "AE NG K AH T" . please Anyone Can help me Out?or Any suggestion?i want to do That way...hope i explained in good way that you can understand in proper way and give me reply.. "
If any one Providing this service with the payment.then even its ok...
Here is an easy website that allows you to do that to create a .dic file: http://www.speech.cs.cmu.edu/tools/lmtool-new.html . Just upload a .txt file with what you would like to add to the dictionary. You can do this multiple times if you have more than a few thousand sentences and then converge them into one file.

Resources