Base URL Changing/Saving

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Base URL Changing/Saving

ccox
Is there a way to change and save the base URL for a script? Or am I just stuck with changing it every time I need to run a script on a different build?

Also is there a way to change the Base URL when opening Selenium in the sidebar?
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

softwaretestingforum
Administrator
Which Selenium tool are you using?

You should be able to change URL using open command in Selenium 1 -

selenium.open("new URL")

Notice that if you change domain then you might run in to security related issues.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

ccox
Selenium IDE (I posted in the right forum, I thought).  

When I open a script, the base URL opens with what the script was originally recorded with.  I can change that url, but if I save the script, it will not save the changed Base URL.  Closing and reopening the script results in the originally recorded Base URL to show.  It seems like there is no way to save the defaulted Base URL for a script once it is recorded/saved the first time.  I was just wondering if anyone knew of a way to get around this.

The problem lies when you open Selenium IDE in the sidebar.  The Base URL is not editable, thus making most of my scripts unusable via the sidebar.  I have to create a new script to run in the sidebar with the Base URL defaulted to where I need my scripts to start.
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

softwaretestingforum
Administrator
Could you post one snap shot? I should be able to guide you better with that
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

ccox


Unfortunately I can't post screenshots of my actual applications/urls.  The one posted should give you an idea of what I am getting at.  

In short, I want to change and save a new base url after it has already been saved.  I am unable to do this.
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

softwaretestingforum
Administrator
I see you point. I experienced same in IDE version 1.7
I can only suggest you file an issue here - http://code.google.com/p/selenium/issues/list
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

ccox
Turns out this is possible. You can open the script in Notepad and edit the Base URL there!
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

softwaretestingforum
Administrator
Thanks for sharing the solution.
I should have tried enough before giving up on it.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

ccox
Haha no worries.  I appreciate the quick responses.  It definitely helps with brainstorming!
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

Ben Paul
In reply to this post by ccox
Thanks! I had the same problem and this fixed it. I used the Find And Replace Text command line tool to replace all BASE URLs with a different BASE URL.
Reply | Threaded
Open this post in threaded view
|

Re: Base URL Changing/Saving

Casey
In reply to this post by ccox
Thank you for sharing this and saving me time!!!