[wtr-general] Re: click link in out of focus

2009-05-01 Thread venky

Hi All,

Thanks a lot its working fine...

Regards,
Venkat
http://www.prog2impress.com/


On Apr 13, 11:48 pm, Chuck van der Linden sqa...@gmail.com wrote:
 I think your nomenclature is what is confusing people.  there is a
 parameter of some objects that can set the to visible or not visible..
 so when people see 'visible' they think you are talking about this.
 Especially since that property does not change if the object is in the
 current 'view' of the user according to the scrolling of the screen.

 I expect that George's suggestion might work for you since what you
 want is not to change the properties of the link, or set thefocuson
 the link, but to scroll the browser window till it is in view of the
 user.

 On Apr 13, 2:16 am, venky venkatesh...@gmail.com wrote:

  Hi Orde,

  Thanks for ur reply. This does't meet the requirement. Let me make
  things clear. When Iclicka link manually I have to scroll down and
 clickthe link. But when I automate toclickthe link, the link is
  getting clicked which is not visible to the user. So my requirement is
  to make the link visible and then toclickthe link. I searched the
  watir api so that is there any function for that but i could't find.

  Can any body throw some light on it.

  Thanks,
  Venkatesh

  On Apr 8, 11:32 pm, orde ohil...@gmail.com wrote:

   Perhaps:

   @browser.link(:id, 'link_id').fire_event('onfocus')
   @browser.link(:id, 'link_id').click

   Do you have sample HTML?

   On Apr 8, 5:13 am, venky venkatesh...@gmail.com wrote:

Hi All,

I need toclicka link which isoutoffocusin the page. I want the
particular link or image to be visible and thenclickit. Can any body
throw some light on it

Thanks,
Venkatesh- Hide quoted text -

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



[wtr-general] jssh (firefox) and unicode

2009-05-01 Thread Stacia

I've been working all day to try to get unicode displayed in text
fields properly. I've come to the conclusion that probably the JSSH
socket connection doesn't support having unicode sent over it - is
there anyone who can confirm this? I saw a fix for Chinese, but this
was for IE, and other fixes involved ugliness like using Excel. Every
time I try to send unicode data (encoded in various ways with
different libraries) the output is always junk. Would building Firefox
with JSSH support built in help at all?  (not that it's an easy option
on windows, but still). I was trying to experiment with JSSH myself
using my own telnet client, but I couldn't find a unicode friendly
telnet client at all (not a good sign). I've tried everything: I
changed the default encoding of Firefox to utf8, I tried nkf, iconv,
and packing arrays of ints into unicode chars. All of these just
output junk (although the last method I could write to text files
fine) I've learned a lot about unicode in *Ruby* but if the problem is
unicode over JSSH that's beyond me.

I also have rewritten the doKeyPressMethod for quite a while now, it
looks like this:

class FireWatir::TextField
  def doKeyPress( value )
@o.value = value
fire_key_events
  end
end

this solves the slow text input problem on linux. I don't care about
inputting the text character by character, which may have caused an
issue with the unicode. I tried just putting in some unicode at that
low level by setting @o.value to a unicode value directly (not sure
how to get even lower level at the JSSH level) and that didn't help.

Please, if I could just get a simple yes or no about whether this is
even possible over JSSH, that would help a lot, thanks

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



[wtr-general] Re: Watir vs Selenium

2009-05-01 Thread Tran Tuan Vinh 10/08

my idea is collection of library of Selenium is worst than watir.
but Selenium support for multi -browser is better. and it have some
another package for using many OS

On May 1, 2:51 pm, venky venkatesh...@gmail.com wrote:
 Hi All,

 I had worked with watir. I would like to explore selenium too as both
 are open source. I am very curious to know the advantages and
 disadvantages of watir and selenium when both are compared. If the
 answer is It depends on requirement kindly let me know for which
 requirement which is the best tool to choose.
 I had googled watir vs selenium. But I would be satisfied if most of
 the experienced QA engineers here share their experience, as it would
 be very helpfull to all.

 Comparison with Watir and other open source are welcome...

 Thanks,
 Venkathttp://www.prog2impress.com/

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



[wtr-general] Stripping url

2009-05-01 Thread ash

Having searched this group, plus the wiki, plus the mail archives I am
still a little confused as to the syntax format for stripping text
from a url.  Apologies if there is a thread covering this already but
I am now getting frustrated with this as it seems such a simple task
but I can't get my head round it.


I have a check in a test to ensure that the url reached is correct but
there is a variable at the end of the url that I don't need.  How do I
get rid of this?

My url is of the format http://www.blah.com/uk/home.asp?variable

So far I have discovered that the following will possibly help;
new_url = ie.url[/(.*)\//] although this strips everything after
uk/.  I just need to strip out ?variable.

My question is really; What does this mean? [/(.*)\//]

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



[wtr-general] Re: Stripping url

2009-05-01 Thread karim rayani

do one thing if you know ruby somewhat

url=ie.url

url_splitted=url.split(?)

puts url_splitted[0] should give you the base url

On Fri, May 1, 2009 at 5:00 PM, ash ashbr...@gmail.com wrote:

 Having searched this group, plus the wiki, plus the mail archives I am
 still a little confused as to the syntax format for stripping text
 from a url.  Apologies if there is a thread covering this already but
 I am now getting frustrated with this as it seems such a simple task
 but I can't get my head round it.


 I have a check in a test to ensure that the url reached is correct but
 there is a variable at the end of the url that I don't need.  How do I
 get rid of this?

 My url is of the format http://www.blah.com/uk/home.asp?variable

 So far I have discovered that the following will possibly help;
 new_url = ie.url[/(.*)\//] although this strips everything after
 uk/.  I just need to strip out ?variable.

 My question is really; What does this mean? [/(.*)\//]

 Cheers...Ash
 




-- 
Regards,

Alkarim Rayani

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



[wtr-general] Re: jssh (firefox) and unicode

2009-05-01 Thread John Kolokotronis

I'm having similar problems working with double byte unicode, like
Japanese and yes, I'm certain the problem is with the jssh extension -
unfortunately, I don't know of any real solution and given that jssh
is abandonware, it's very hard to get any help with it on any
platform. Unicode works for me when it comes to getting values from
the browser, e.g doing this on button with a Japanese value, will
work:

@browser.button(:id, btn_back).value.should == JapaneseString # I
have to load the string from an Excel sheet though to avoid problems,
so the assertion checks against a variable or constant that is loading
the string content from within the Excel file...

But setting a text_field with unicode, like:

@browser.text_field(:id, whatever).set(JapaneseString) # again
loading the unicode string from Excel...

results in garbage characters... The value method does not work
either:

@browser.text_field(:id, whatever).value = JapaneseString

I'm not sure jssh can even be compiled with proper unicode support,
but I just don't know enough about it to be able to try on my own...
Sorry I didn't have any real solution for you...

Regards,

John

On May 1, 12:54 am, Stacia baka...@gmail.com wrote:
 I've been working all day to try to get unicode displayed in text
 fields properly. I've come to the conclusion that probably the JSSH
 socket connection doesn't support having unicode sent over it - is
 there anyone who can confirm this? I saw a fix for Chinese, but this
 was for IE, and other fixes involved ugliness like using Excel. Every
 time I try to send unicode data (encoded in various ways with
 different libraries) the output is always junk. Would building Firefox
 with JSSH support built in help at all?  (not that it's an easy option
 on windows, but still). I was trying to experiment with JSSH myself
 using my own telnet client, but I couldn't find a unicode friendly
 telnet client at all (not a good sign). I've tried everything: I
 changed the default encoding of Firefox to utf8, I tried nkf, iconv,
 and packing arrays of ints into unicode chars. All of these just
 output junk (although the last method I could write to text files
 fine) I've learned a lot about unicode in *Ruby* but if the problem is
 unicode over JSSH that's beyond me.

 I also have rewritten the doKeyPressMethod for quite a while now, it
 looks like this:

 class FireWatir::TextField
   def doKeyPress( value )
     @o.value = value
     fire_key_events
   end
 end

 this solves the slow text input problem on linux. I don't care about
 inputting the text character by character, which may have caused an
 issue with the unicode. I tried just putting in some unicode at that
 low level by setting @o.value to a unicode value directly (not sure
 how to get even lower level at the JSSH level) and that didn't help.

 Please, if I could just get a simple yes or no about whether this is
 even possible over JSSH, that would help a lot, thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Stripping url

2009-05-01 Thread ash

Spot on, thanks.  I don't really know Ruby yet but using your advice I
got it working.

My new code;

require 'watir'
test_site=http://www.blah.com/uk/home.asp?src=ash;
ie = Watir::IE.new
ie.speed = :fast

ie.goto test_site

url=ie.url
url_splitted=url.split(?)

if url_splitted[0] == http://www.blah.com/uk/home.asp;
  puts ok
else
  puts bugger!
end

On May 1, 1:01 pm, karim rayani karim@gmail.com wrote:
 do one thing if you know ruby somewhat

 url=ie.url

 url_splitted=url.split(?)

 puts url_splitted[0] should give you the base url





 On Fri, May 1, 2009 at 5:00 PM, ash ashbr...@gmail.com wrote:

  Having searched this group, plus the wiki, plus the mail archives I am
  still a little confused as to the syntax format for stripping text
  from a url.  Apologies if there is a thread covering this already but
  I am now getting frustrated with this as it seems such a simple task
  but I can't get my head round it.

  I have a check in a test to ensure that the url reached is correct but
  there is a variable at the end of the url that I don't need.  How do I
  get rid of this?

  My url is of the formathttp://www.blah.com/uk/home.asp?variable

  So far I have discovered that the following will possibly help;
  new_url = ie.url[/(.*)\//] although this strips everything after
  uk/.  I just need to strip out ?variable.

  My question is really; What does this mean? [/(.*)\//]

  Cheers...Ash

 --
 Regards,

 Alkarim Rayani- Hide quoted text -

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



[wtr-general] Re: click_no_wait and click! not working javascript popup

2009-05-01 Thread ash

I am also receiving the TimeOutException but am using solution #4 from
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups so do not have
anywhere to place the sleep.

Segment of my script;
ie.button(:class, button_checkout).click_no_wait
hwnd = ie.enabled_popup(5)
if (hwnd)  #yeah! a popup
  popup = WinClicker.new
  popup.makeWindowActive(hwnd)
  popup.clickWindowsButton(Windows Internet Explorer, OK, 30)
end

Where should I put the 'sleep'?
Obviously I may be missing the point so feel free to shout at me if
necessary.

Cheers...Ash

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



[wtr-general] Re: Watir vs Selenium

2009-05-01 Thread Chris McMahon


I've worked with Selenium the past two years.  It's an excellent
tool.

For one thing, support for multiple browsers is excellent because the
way Selenium goes about manipulating pages is consistent from browser
to browser.  Watir is rapidly achieving support for multiple browsers,
but it is using different mechanisms to manipulate each browser.

I recently found an instance where Watir was far better than
Selenium.  I had a need to analyze a web site that contained a lot of
poorly-formed HTML.  Selenium would not recognize the pages at all,
but Watir worked quite well.

At one time Watir was somewhat easier to learn, although I think
Selenium (especially with Selenium-RC) has been catching up.
Traditionally Selenium appealed more to developers new to testing and
Watir more to testers new to development, but I think that distinction
is disappearing.

So I'd say: try them both, build a few dozen assertions about the
behavior of your particular site with each, and see which is more
comfortable.

On May 1, 1:51 am, venky venkatesh...@gmail.com wrote:
 Hi All,

 I had worked with watir. I would like to explore selenium too as both
 are open source. I am very curious to know the advantages and
 disadvantages of watir and selenium when both are compared. If the
 answer is It depends on requirement kindly let me know for which
 requirement which is the best tool to choose.
 I had googled watir vs selenium. But I would be satisfied if most of
 the experienced QA engineers here share their experience, as it would
 be very helpfull to all.

 Comparison with Watir and other open source are welcome...

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



[wtr-general] Re: Connecting Watir to an IE control in a dotnet app?

2009-05-01 Thread mwolfe

I'm trying to do this as well. see my blog for more details:
http://www.wolfewebservices.com/blog/attaching-watir-embedded-ie-browser

On Mar 19, 11:26 pm, Alister Scott alister.sc...@gmail.com wrote:
 Hi David,
 Did you ever get this to work?
 I am trying to do a similar thing with anembeddedIEautomation
 object inside a powerbuilder app.
 Thanks,
 Alister Scotthttp://watirmelon.wordpress.com/

 On Aug 4 2007, 12:26 am, David Pollack davidspoll...@gmail.com
 wrote:

  thanks, we will give this a shot.

  On 8/3/07, Bret Pettichord b...@pettichord.com wrote:

   kyleaschmitt wrote:
Yup.  Theieis hidden inside a windows forms app.  So there is no
iexplore.exe in the process list even.

   If you can get access to the automation object, this will work:

  ie=Watir::IE.new nil
  ie.ie= the_automation_object_from_my_app
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Connecting Watir to an IE control in a dotnet app?

2009-05-01 Thread Paul Rogers
can you use spy++ to get the hwnd of the brower and attach using that?

Paul

On Fri, May 1, 2009 at 2:06 PM, mwolfe mwolf...@gmail.com wrote:


 I'm trying to do this as well. see my blog for more details:
 http://www.wolfewebservices.com/blog/attaching-watir-embedded-ie-browser

 On Mar 19, 11:26 pm, Alister Scott alister.sc...@gmail.com wrote:
  Hi David,
  Did you ever get this to work?
  I am trying to do a similar thing with anembeddedIEautomation
  object inside a powerbuilder app.
  Thanks,
  Alister Scotthttp://watirmelon.wordpress.com/
 
  On Aug 4 2007, 12:26 am, David Pollack davidspoll...@gmail.com
  wrote:
 
   thanks, we will give this a shot.
 
   On 8/3/07, Bret Pettichord b...@pettichord.com wrote:
 
kyleaschmitt wrote:
 Yup.  Theieis hidden inside a windows forms app.  So there is no
 iexplore.exe in the process list even.
 
If you can get access to the automation object, this will work:
 
   ie=Watir::IE.new nil
   ie.ie= the_automation_object_from_my_app
 


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