Re: [wtr-general] Can't use = sign in URL.

2013-06-06 Thread Jim Bailey
Neither of those worked. For now I am using this:

b.goto(properties.getUrl.gsub("\n",'') + 'source=' +
properties.getSource.gsub("\n",'') + '&' + 'xyzclubcode=' +
properties.getxyzclubcode.gsub("\n",'') + '&' + 'state=' +
properties.getState.gsub("\n",'') + '&' + 'zipcode=' +
properties.getZipcode.gsub("\n",''))
With some changes to my .rb file.

And a reformatting of the .txt properties file to:

url=http://Foo.Bar.com/Portal/quote?
source=club
xyzclubcode=212
state=VA
zipcode=20109


I'll try to get back to this issue for a better answer.

The links you sent earlier were somewhat helpful but I could not figure out
how to transform the information into usable commands.
I learned the %3D should replace the = sign.


On Thu, Jun 6, 2013 at 6:38 AM, Željko Filipin wrote:

> On Wed, Jun 5, 2013 at 5:52 PM, Jim Bailey  wrote:
>
>> For now, can I forget about the properties file, and have the Watir
>> script put the url directly in the address bar?
>>
>
> Sure, try this:
>
> b.goto(URI.escape "
> http://FooBar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210<http://foobar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210>
> ")
>
> or
>
> b.goto "
> http://FooBar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210<http://foobar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210>
> "
>
> Željko
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/u5fJr43D74Y/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] Can't use = sign in URL.

2013-06-05 Thread Jim Bailey
For now, can I forget about the properties file, and have the Watir script
put the url directly in the address bar?
If that is possible I'll need the commands to do so.

I got nowhere with the links you sent.

When I add p properties.getUrl to my script the output is there minus
anything to the right of the left most equal sign.

Turns from this:

http://FooBar.com/AP/quote?source=club&aaaclubcode212&state=CA&zipcode=90210

To:

http://FooBar.com/AP/quote?source

So it is ignoring all the the right of the equals sign as I expected.






On Tue, Jun 4, 2013 at 4:19 PM, Željko Filipin wrote:

> On Tue, Jun 4, 2013 at 8:26 PM, Jim Bailey  wrote:
>
>> b.goto(properties.getUrl)
>
>
> Add this before above line:
>
> p properties.getUrl
>
> That will display the contents of the variable. That is always helpful
> when debugging.
>
> The magic word is probably URL encoding[1].
>
> Something like this should fix the problem:
>
> b.goto(URI.escape(properties.getUrl))
>
> More information:
> http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI/Escape.html#method-i-escape
>
> Željko
> --
> 1: http://en.wikipedia.org/wiki/Percent-encoding
>
> --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/u5fJr43D74Y/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [wtr-general] Can't use = sign in URL.

2013-06-04 Thread Jim Bailey
I'm using Watir with Ruby 1.86.

I have a properties file that I point to when I fire up a Watir script.

properties = TemplateProperties.new("../properties/template_properties.txt")

Then it uses this:

b.goto(properties.getUrl)

to pull the correct url.  I use several.

When I attempt to fire up a Watir script I do not get the website that I'm
looking for when I use the url in my previous (original) post, given to me
today to test with.
When I copy and paste the url into the browser address bar it works fine.
When I copy and paste the url into the browser address bar, up to the first
= sign I get the same result as when I try to fire it up in Watir.
So, I'm pretty sure Watir/Ruby interprets the = as something else. (like,
oh this must be a new row)
I did some research before I posted.
Someone else had a similar issue where the equals sign was replaced with
something like %3D. It worked for them, not for me.


On Tue, Jun 4, 2013 at 1:05 PM, Željko Filipin wrote:

> How is this related to Watir? I have no idea what you are talking about.
> Moar context, please. :)
>
> Željko
> --
> https://leanpub.com/watirbook
>
>
> On Tue, Jun 4, 2013 at 5:59 PM, JimJamie  wrote:
>
>>
>> It seems to stop looking at the first equal sign.
>> Is there a way to rewrite the equals sign and get the same result?
>> I have something like this in my properties file.
>>
>> #url=
>> http://FooBar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210
>>
>>
>>  --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> watir-general@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-general+unsubscr...@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to watir-general+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> watir-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/u5fJr43D74Y/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> watir-general+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.