ahhh, ok yeah. I will mark that for use in some other projects.
With this one I am working I am left with unfortunate that they dont have a
common www.someserver.com/
the pre-fix of the URL is different every time because it includes the dev
ID and server they use and a ticket number sometimes. There is no
standarization basically between each url in test enviroment. I believe you
have helped realize that it would be helpful to standarize the testing urls
and now I have something I can present to show why it would be helpful.
Thank you again!
On Wednesday, October 3, 2012 10:58:47 AM UTC-7, Oscar.Rieken wrote:
> lets say you set an environment variable
>
> ENV['URL'] ||= "test"
>
>
> then when you call the url you can do something like
>
> browser.goto("www.someserver.com/#{ENV['URL']}/app_path/<http://www.someserver.com/#%7BENV['URL']%7D/app_path/>
> ")
>
>
> so by default if you just do something like
>
> rspec
>
> it will go to "www.someserver.com/test/app_path/"
> but if you do
>
> URL=something_else rspec
> it will go to "www.someserver.com/something_else/app_path/"
>
> On Wed, Oct 3, 2012 at 1:43 PM, Ry <[email protected] <javascript:>>wrote:
>
>> Oscar,
>>
>> You've piqued my interest now. By your suggestion, are you refering to
>> editing the script file prior to running? or some other way? Is there a
>> link to some documentation to show me more about your suggestion? An
>> example would greatly ensure my understanding.
>>
>> Thanks!
>>
>> Ryan
>>
>> On Wednesday, October 3, 2012 5:26:17 AM UTC-7, Oscar.Rieken wrote:
>>
>>> if its a differnt url for every build depending on the changes in the
>>> url why not just pass that in to the url string at run time
>>>
>>> On Tue, Oct 2, 2012 at 8:48 PM, Ry <[email protected]> wrote:
>>>
>>>> Would that work if URL changes a few times a day? We cut what we call a
>>>> release from development and the URL contains link to our product site in
>>>> the dev enviroment with the change code. So basically its a new URL for
>>>> every change we do.
>>>>
>>>>
>>>> On Tuesday, October 2, 2012 4:02:19 PM UTC-7, Dave McNulla wrote:
>>>>
>>>>> Of course. You can store information in a yaml file, ini file, or
>>>>> properties file. Where I work, we use buildr with properties files that
>>>>> allow us to switch the system under test as easily as using a different
>>>>> environment variable:
>>>>> buildr -e test cuke
>>>>> where test represents a test.properties file, and cuke runs our
>>>>> cucumber feature files.
>>>>>
>>>>> Hope that helps,
>>>>>
>>>>> Dave
>>>>>
>>>>> On Tuesday, October 2, 2012 2:28:25 PM UTC-7, Ry wrote:
>>>>>>
>>>>>> I will try my best to explain my question.
>>>>>>
>>>>>> Is it possible...
>>>>>>
>>>>>> I have several sites, they are essentially the same, (same menus,
>>>>>> reports ect..) the GUI is identical, but data may vary. Test sites,
>>>>>> essentially, but each site has a different URL in testing or staging
>>>>>> environment.
>>>>>>
>>>>>> Because that is the case, currently, we have to edit our script and
>>>>>> change the url each time we want to run a script to a specific site.
>>>>>>
>>>>>> THE QUESTION! =)
>>>>>>
>>>>>> could the script have a variable of some sort that looks to a field
>>>>>> in a web page (that we're building in house) to see what site is pasted
>>>>>> in
>>>>>> the field and then run the script using whatever site is listed in the
>>>>>> field? or something similar to that, but basically a universal variable
>>>>>> for
>>>>>> the URL that someone can run across several sites with same GUI, but
>>>>>> without having to edit the script.
>>>>>>
>>>>>> Thank you for any ideas on this.
>>>>>>
>>>>> --
>>>> Before posting, please read http://watir.com/support. In short: search
>>>> before you ask, be nice.
>>>>
>>>> [email protected]
>>>> http://groups.google.com/**group/watir-general<http://groups.google.com/group/watir-general>
>>>> watir-genera...@**googlegroups.com
>>>>
>>>
>>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> [email protected] <javascript:>
>> http://groups.google.com/group/watir-general
>> [email protected] <javascript:>
>>
>
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]