Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving to a dynamic filename for steps such as save, dump, write, snap, table #120

Closed
kensoh opened this issue Apr 7, 2018 · 2 comments
Closed
Labels

Comments

@kensoh
Copy link
Member

kensoh commented Apr 7, 2018

Raising this from an user email for sharing, as other users might benefit from this question.


Script in C:\test1
Need to write csv to another folder: F:\apps\test1

Tried the following on windows:

output_filename = "F:\apps\test1\test123.txt"
echo "output_filename = " + output_filename
dump "this is test123" to '+output_filename+'

Error message:
output_filename = F:\apps\test1\test123.txt
dump "this is test123" to '+output_filename+'
Unable to open file 'F:/apps/test1/F:\apps\test1\test123.txt'
F:/apps/tagui/src/phantomjs:/platform/fs.js:79 in open
F:/apps/tagui/src/phantomjs:/platform/fs.js:136 in write
F:/apps/tagui/src/phantomjs:/code/output1.js:81 in save_text
F:/apps/tagui/src/phantomjs:/code/output1.js:1208
F:/apps/tagui/src/phantomjs:/platform/casper.js:1637 in runStep
F:/apps/tagui/src/phantomjs:/platform/casper.js:414 in checkStep

For your advice, please.

@kensoh
Copy link
Member Author

kensoh commented Apr 7, 2018

Having a dynamic filename wasn't planned as part of the use scenarios, but I can imagine that it is going to very useful. Thanks for raising this! I've made a commit to the cutting edge version which you can download and use right away for both macOS and Windows. Let me know if you run into issues :)

@kensoh kensoh closed this as completed Apr 7, 2018
@kensoh
Copy link
Member Author

kensoh commented Apr 7, 2018

Adding a note that this dynamic filename works also for load step to load from a filename that is dynamically formed during run-time and not pre-scripted during automation flow development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant