2010/5/19 angelo <
angelo...@yahoo.it>:
> I would like to avoid using below user library:
> def Change_Directory(dir):
> os.chdir(dir)
> print "DST: ", os.getcwd()
This looks fine so there's no real reason to avoid using it.
> Is there a Keyword to change directory?
RF itself doesn't have keyword for changing directory. The main reason
is that Jython 2.2 didn't support that. I just tested that it works
with Jython 2.5.1 at least on Linux, so adding `Change Directory` to
OperatingSystem library is possible. The keyword should probably also
return (and log) the old directory so that it's possible to change the
directory back. Additionally there could be `Get Current Directory`
that just returns and logs the os.getcwd().
Please submit an issue if you want these keywords to be added. The
changes of getting this into RF 2.5 rises if someone is willing to
create a patch including implementation, documentation and preferably
also tests. I can help with that if needed, but I have too much 2.5
work to do at the moment to take care of all the work.
Cheers,
.peke
--
Agile Tester/Developer/Consultant ::
http://eliga.fi
Lead Developer of Robot Framework ::
http://robotframework.org