[wtr-general] Get PHP Session Variable

2013-06-04 Thread He Bing Lin
I wonder if you can get php session variable such as username. Im using 
watir to verify after a user logged in and hit submit it will display the 
username who submit the item.it is not saved in cookies. Thank you

-- 
-- 
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] Getting JavaScript Error: a is null for what ever I do with watir on firefox

2013-06-04 Thread Željko Filipin
On Tue, Jun 4, 2013 at 3:58 AM, Ankita@Adslot ankita.gu...@adslot.comwrote:

 whatever action I try to perform with Watir-webdriver on firefox, I get
 JavaScript Error: a is null


Our mind reading equipment is out of order at the moment. It should get
fixed soon. In the meantime, please share more information. For example,
the code that causes the error message, environment (operating system and
version, ruby version, watir gem version...)

Željko
--
https://leanpub.com/watirbook

-- 
-- 
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] Get PHP Session Variable

2013-06-04 Thread Željko Filipin
On Mon, Jun 3, 2013 at 10:19 PM, He Bing Lin peter...@gmail.com wrote:

 I wonder if you can get php session variable


I think this is a general Ruby question, not specific to Watir. How would
one see PHP variables from a Ruby script?

Željko
--
https://leanpub.com/watirbook

-- 
-- 
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] Get PHP Session Variable

2013-06-04 Thread He Bing Lin
yeah i was thinking about that too. just asking if that was possible. thanks

On Tuesday, June 4, 2013 4:42:53 AM UTC-4, Željko Filipin wrote:

 On Mon, Jun 3, 2013 at 10:19 PM, He Bing Lin pete...@gmail.comjavascript:
  wrote:

 I wonder if you can get php session variable


 I think this is a general Ruby question, not specific to Watir. How would 
 one see PHP variables from a Ruby script?

 Željko
 --
 https://leanpub.com/watirbook 


-- 
-- 
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.




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

2013-06-04 Thread JimJamie

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=clubclubcode=412state=CAzipcode=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.




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

2013-06-04 Thread Željko Filipin
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 jbailey...@gmail.com 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=clubclubcode=412state=CAzipcode=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 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 zeljko.fili...@gmail.comwrote:

 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 jbailey...@gmail.com 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=clubclubcode=412state=CAzipcode=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.




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

2013-06-04 Thread Dan
I think you're going to want to look into using yaml instead of flat text 
files.  You'll want to start by looking here.

http://www.ruby-doc.org/stdlib-1.8.7/libdoc/yaml/rdoc/YAML.html#method-c-parser

On Tuesday, June 4, 2013 2:26:05 PM UTC-4, JimJamie wrote:

 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 
 zeljko@gmail.comjavascript:
  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 jbail...@gmail.comjavascript:
  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=clubclubcode=412state=CAzipcode=90210


  -- 
 -- 
 Before posting, please read http://watir.com/support. In short: search 
 before you ask, be nice.
  
 watir-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com javascript:
  
 --- 
 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-genera...@googlegroups.com javascript:.

 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-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com javascript:
  
 --- 
 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-genera...@googlegroups.com javascript:.
 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 Željko Filipin
On Tue, Jun 4, 2013 at 8:26 PM, Jim Bailey jbailey...@gmail.com 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 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.