I want to create some automation so the user would have to place a file with some details like their address and then my automation script would pick it up.
I'm comfortable with using the const command in TestCafe to pick up local variables but is there a way if i put a file in like lets say address.txt for it to pick up line1 line2 line3, etc?
So i see the code like this:
const line1;
const line2;
const line3;
and in Address.txt we'd have
$line1 = '1 hello world way'
$line2 = 'line 2'
$line3= 'line 3'
What am i missing to plug it all together? Thanks,
This would be better if done through json. Here is a high level approach you could take: