Site List in one script reference by all scripts

Say I have 3 scripts and in each one open IE and types in a URL to test.

I want to be able to change that URL in all 3 scripts without having to open each one.

Can I put the URL in some… thing… some place where all the scripts point… and then I can just change it in that one place?

See what I mean?

thanks

I would put your URL in a text file, then at the top of each script say something like:

put file "/path/to/my/file/url.txt" into url

That should do it. There are a couple of more complicated ways, but this should work.

You could also stay entirely in Eggplant and create a script called getURL, that contains a function that is also called getURL that looks like this:

function getUrl
	return "http://google.com"
end getUrl

Then in your scripts you can just call the function like this:

TypeText getURL()

and Eggplant will type whatever you set as a return value for the function.

Neat. I got the first one working but I like the second one too… choices… choices…

Okay, so I’m a little rusty. It’s been pointed out to me that the function code above doesn’t even need to be declared as a function and can just be reduced to

return "http://google.com/"

Even simpler.

Long time, no see :slight_smile:

Thanks, Allen. Good to be back. Everybody to the limit!