Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Input text from external file(How to use "ub_app_inputText" to input text from a text document)
Input text from external file [message #1066400] Tue, 02 July 2013 08:51 Go to next message
Asgeir Sognefest is currently offline Asgeir Sognefest
Messages: 6
Registered: June 2013
Junior Member
Hi,
under test I want to create a new file and then use "ub_app_inputText" to input text into the new file from a text document.

The text document can change so I need ANT to download the text document before every test run.

What is the preferred way to do this in Jubula?

Regards,
Asgeir
Re: Input text from external file [message #1066565 is a reply to message #1066400] Wed, 03 July 2013 04:07 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1127
Registered: July 2009
Senior Member
Hi,

is there any way you could get the text into an Excel sheet? There is support for older versions of Excel to be used as data for a test. Otherwise, I'm sure there must be a way of doing it, but I'm not sure how. If no one else here has any ideas, you could try the developer list. They might be able to point you to the correct place to adapt Jubula / a way of achieving this with the current implementation.

HTH,
Alex
Re: Input text from external file [message #1066593 is a reply to message #1066565] Wed, 03 July 2013 06:59 Go to previous message
Asgeir Sognefest is currently offline Asgeir Sognefest
Messages: 6
Registered: June 2013
Junior Member
Thanks for the answer Smile
But I have now found a way to do it I use environment variables in the tests.

So to answer my own question: Razz
I run the tests with a script like this (bash):
rm file.txt
wget http://www.eclipse.org/file.txt
export TEST_UDV_FILE=$(cat "file.txt")
ant test


in the test I use "ub_app_inputText" with this:
${FILE} 

in the VARIABLE field.

The problem now is that I actual want to do it all (setting the environment variables) within the ANT-script.

[Updated on: Wed, 03 July 2013 07:07]

Report message to a moderator

Previous Topic:can not run test with remote aut agent
Next Topic:Transfer object mappings
Goto Forum:
  


Current Time: Thu Aug 28 01:18:45 EDT 2014

Powered by FUDForum. Page generated in 0.18367 seconds