Re: [wtr-general] [Watir-Webdriver] Carriage Returns

2011-08-16 Thread Jari Bakken
On Tue, Aug 16, 2011 at 2:11 AM, hillary weimar1...@gmail.com wrote:


 But when i tried this in web-driver it doesn't anymore. It enters text but
 the values are no longer separated by a carriage return.

 I've tried everything in this 
 posthttps://groups.google.com/d/topic/watir-general/SONhM3BnJD4/discussion.
 And I can't use send_keys because the text area doesn't allow the user to
 use up, down, or enter/return.



What sort of text area is this (since it prevents up/down/enter/return? E.g.
this works for me:

  https://gist.github.com/1148796

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


Re: [wtr-general] [Watir-Webdriver] Carriage Returns

2011-08-16 Thread hillary
I tried your solution and it didn't work. I also tried something like 
this 44F5DED9\n\n3160E198 without using send_keys and it sets the text 
field like this 44F5DED93160E198. 

Here's the html 

textarea id=TextBoxFilterAccountItemID cols=50 rows=5/textarea

I'm not sure why it prevents up/down/return. It could be just an expanded 
text field, would that make a difference? Do you know why watir-webdriver 
would be different than watir? It seems like webdriver is ignoring the 
carriage returns in my set string but watir didn't.

The test is that the user can search for skus that they've entered into the 
textarea by copying and pasting them from a file. Is there a way to simulate 
that? Or is that what the file path references in your gist are? 





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


Re: [wtr-general] [Watir-Webdriver] Carriage Returns

2011-08-16 Thread Jari Bakken
On Tue, Aug 16, 2011 at 7:02 PM, hillary weimar1...@gmail.com wrote:

 I tried your solution and it didn't work.


Does this mean you ran the code from my link and it did not work?




 I'm not sure why it prevents up/down/return. It could be just an expanded
 text field, would that make a difference? Do you know why watir-webdriver
 would be different than watir? It seems like webdriver is ignoring the
 carriage returns in my set string but watir didn't.

 It's hard to guess about why you're seeing a problem. If you're able to
modify the code from my example to make it fail, or provide a public URL + a
script that reproduces the problem, it would make it easier to help 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


Re: [wtr-general] [Watir-Webdriver] Carriage Returns

2011-08-16 Thread hillary
Yes I tried the code from your script and it didn't work. 

This is my code. 
require 'rubygems'
require 'watir-webdriver'

browser = Watir::Browser.new :ie

begin
  browser.goto mysite
  
#Login to the Application 

#Click the Sign In button
browser.button(:id, btn_sign_in).click
browser.image(:id, tabAccounts).click
browser.link(:id, ctl00_Content_LinkButtonBlackList).click 
browser.div(:id, ctl00_Content_PanelBlacklist).button(:id, 
Button2).click
  field = browser.div(:id, popup_black_list).text_field(:id, 
TextBoxFilterAccountItemID)
  field.set(foo\nbar\nbaz) #It set it as foobarbaz
  field.send_keys :arrow_up, :arrow_up, :arrow_up, :delete, :delete
  p field.value #= o\nbar\nbaz #the value it printed wasfoobarbaz
ensure
  browser.quit
end

I'm testing a proprietary web application, that really isn't open to the 
public so i can't really give out the url/login information, is the code 
sample above enough? If not i'll have to think of something else. 

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


[wtr-general] [Watir-Webdriver] Carriage Returns

2011-08-15 Thread hillary
I have a text area that allows the user to copy and past from a file values 
that are separated by a carriage return like this: 
a 
b
c

In watir, this code worked: 
b.text_field(:id, x).set(a
b
c)

But when i tried this in web-driver it doesn't anymore. It enters text but 
the values are no longer separated by a carriage return. 

I've tried everything in this 
posthttps://groups.google.com/d/topic/watir-general/SONhM3BnJD4/discussion. 
And I can't use send_keys because the text area doesn't allow the user to 
use up, down, or enter/return. 

Does anyone have any ideas?

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