Natasha,
Here is one way you may try. I have tested this on FC8 setup,
however I am not sure about Windows.

You can use IP address aliasing. Please refer to link below to
know how to create IP aliases on Windows/Linux.

http://www.webperformanceinc.com/support/suite/manual/multiple_ip_addresses.html

You will need two such machines. One will run you web server and
other will run your IE/FF browser.

You can use following IPs for your server

192.168.1.1 (lets say this maps to US.com)
192.168.2.1 (this one to UK)
.   (and many more)
.

and client machine will have

192.168.1.2
192.168.2.2
192.168.3.2

and so on.

You will have to configure your web server so that it should bind to
all IP address that you have created using aliases. Please refer to
your apache or ISS server document to figure that out. By default httpd
binds to all IP addresses.

Once you have done this your watir script should access the server using
the different server IP that you have configured above. The very fact
that you are using the server IP, your request will be generated so that
the source IP will be corresponding to the aliased local IP. E.g.
http://192.168.1.1/ should result in site being accessed from US
where as http://192.168.2.1/ should result in site being access from
UK. (You will have to make sure your mapping gets right with IP 
addresses you chose.)

Hope this helps.
Regards,
Manish

Natasha wrote:
> Hi All,
> 
> Just wanted to get technical suggestion. Its not related to Watir. But
> in case this can be automated using Ruby/Watir, it would be great :)
> 
> I need to test following scenario:
> 
> If a user accesses a website from US, then the URL should transform to
> us.test.com.If a user accesses it from UK, then the url should change
> to uk.test.com.
> This is based on source IP. So need a way to fake the source IP.
> 
> Has anyone tested a similar scenario? If yes, how did you fake your
> machine IP?
> Here the testing needs to be done with internal URLs, hence we cannot
> use Public Proxies.
> 
> So is there a way in which I can configure my machine IP, without much
> cost overheads, inorder to test it out.
> 
> Thanks in advance,
> Natasha Ranney
> 
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to