Re: [wtr-general] Error

2011-09-05 Thread Сергей Демьянчук
Hi, try first enter in irb, before firewatir requirement
 require 'rubygems'

Sergii

2011/9/5 jp skbj...@gmail.com

 I get the error like require : no such files to load --firewatir
 in cmd promt..

 But i already install using this syntax

 gem install firewatir

 succesfully installed...
 after that i will check it in
 irb require 'firewatir'
 get error like require:no such files to load LoadError

 Can anyone guidw me...


 Thanks in advance!


 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] access ul and li elements in below html..

2011-03-14 Thread Сергей Демьянчук
*1.
*control = browser.text_field(:id, Cars)
control.lis.each do |li|
  li.flash
  li(:text, 'Toyota').link(:index, 1).attribute_value(href)
  # li(:text, 'Toyota').link(:index, 1).click
end

*2.*
list.ole_methods if list.ole_object != nil

*3.*
http://www.w3schools.com/xpath/default.asp

Best regards,
Sergii

2011/3/14 Girish girish.bha...@gmail.com

 Hey All,

 Here is a piece of html
 ul id=Cars
   li class=selecteda href=/landing/toyota spanToyota/
 span/a/li
   lia href=/landing/hondaspanHonda/span/a/li
   lia href=/landing/nissan spanNissan/span/a/li
  /ul

 I have 3 questions:
 1. How would i iterate over all the li elements and get reference of
 the href element and click on it?
 2. I tried  list=ie.elements_by_xpath(//ul[@id='channelnames']/li)
   when i try to print  values of list, i get #WIN32OLE:0x3225e40.
   Where can i get properties for WIN32OLE?
 3. Where can i get more documentation on accessing elements by XPATH?

 Can anyone guide me ?

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] Re: click Div button

2011-03-03 Thread Сергей Демьянчук
Hi, vin

First, you have to make sure that expected event fires exactly after
clicking on the div element, and not on the another element, for example,
not after clicking on the image with src =
/gui-framework/images/FolderOpen.gif.
Also some times you have to use fireEvent instead of clicking on the
element. So please try something like this:

b.div(:id, configure_access_left).fireEvent(onmousedown)
  or
b.div(:id, ext-genits dynamic ID).fireEvent(onmousedown)

Also, agree with Željko could you please explain what do you mean saying:
not working ?

Thanks,
Sergii

2011/3/3 vin vinay...@gmail.com

 I need to use the first div which as static ID as
 configure_access_left:

 I have tried below methods but its not working:
 b.div(:id, configure_access_left).click
 b.div(:id, ext-gen236).click

 Also please let me know if i can make use of Access (marked ) to
 achieve required click operation?
 ###
 .div id=configure_access_left class=transparent x-abs-layout-item
 style=font-size: 11px; top: 6px;
 div id=ext-gen236 class=transparent-bwrap
 div id=ext-gen237 class=transparent-body transparent-body-
 noheader
 img id=010200 src=/gui-framework/images/FolderOpen.gif/
  Access  
 /div
 /div
 /div
 /div
 /div
 /div

 Thanks,

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] Re: Unable to locate element

2011-02-18 Thread Сергей Демьянчук
Hi, Ashu,

You wrote before that you use Firebug, could you please give xpath from
firebug for desired element ?

2011/2/18 Chuck van der Linden sqa...@gmail.com

 are there Frames on the page perhaps?

 On Feb 17, 11:41 pm, Ashu ashay.n...@gmail.com wrote:
  On trying the above line of code
  irb displays
  irb(main):045:0 ie.image(:alt, 'Open SDP file').wait_until_present
  Watir::Exception::UnknownObjectException: Unable to locate element,
  using :alt,Open SDP file
  from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
  firewatir/element.rb:907:in `assert_exists'
  from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/
  firewatir/element.rb:1266:in `method_missing'
  from (irb):45
  from :0
  :-(
  On Feb 17, 2:00 pm, Alastair Montgomery doodl...@gmail.com wrote:
 
 
 
   Is it possible that you are trying to access the element before it has
 had
   time to render?
   We use jQuery and its elements sometime take a while to render fully.
 
   Try putting a line of *ie.image(:alt, 'Open SDP
 file').wait_until_present* before
   you attempt to click on it.- Hide quoted text -
 
  - Show quoted text -

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] Re: Disable file download popup in IE

2011-02-17 Thread Сергей Демьянчук
Hi, Željko

Could you please try open registry with system key
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Zones\3] and change data type of the value named 1803 from 0 to
3 (0 - enable download dialog, 3 - disable download dialog) and reply
if it works for you.
This is works fine for me, but i get another alert modal dialog with
message: Your current security settings do not allow this file to be
downloaded., and AutoIt handles this excelent.
I used instructions from
herehttp://www.pctools.com/guides/registry/detail/901/
.

Thanks,
Sergii


2011/2/17 Željko Filipin zeljko.fili...@wa-research.ch

 On Wed, Feb 16, 2011 at 7:25 PM, Dave McNulla mcnu...@gmail.com wrote:
  http://kb.winzip.com/kb/entry/69/

 I think this is a solution to enable file download popup: the File
 Download dialog will display again and will ask if you want to open the file
 or save it.

 IE really confuses me. I was able to disable file download popup in all
 other popular browsers in a few minutes. I am playing with IE for days with
 no luck.

 Anybody that finds the solution has a beer at seconf[1], viaqa[2] or any
 other conference where the both of us are there. :)

 Željko
 --
 [1] http://www.seleniumconf.com/
 [2] http://viaqa.mobi/

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


-- 
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] Need Help on Span ......Filipin

2011-02-17 Thread Сергей Демьянчук
Try this code to see awayliable properties for spans on the page :

ie.spans.each do |span|
span.flash
span.to_s
end

Also this code works for me:

ie.span(:text, 'Hello').flash

If those spans are in the frame you possibly will need additional code to
use.

I suggest to use xpath to locate elements with same properties.
What effect do you want to achieve clicking on the span ?

2011/2/17 mike_sukhi sukhija...@gmail.com



 The code is:

 td class=connect_widget_vertical_center
 connect_widget_button_celldiv class=connect_button_sliderdiv
 class=connect_button_containera class=connect_widget_text_button
 clearfix time_button_no_timespan class=timeHello/span/a/
 div/div/td

 Hello appears 10 times on the page..with same code:
 I have tried with the following option but no success.

 $IE.span(:class ='time', :text ='Hello').click
 or
 $IE.span(:class ='time', :index=7).click

 still no sucess ...

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] Re: Need Help on Span ......Filipin

2011-02-17 Thread Сергей Демьянчук
I am really confused by your new code also it is seriously differ from
previous one and i could not find span with hello text in it, cuz the main
idea was to locate span element on the page as i understand.
Still recommend to use xpath for lement location, probably HttpWatch is
handy to use here.

2011/2/17 mike_sukhi sukhija...@gmail.com

 the code now of a div is in which hello is not showing but it seems
 to hello-button-11 is the real button and hello is a image..i
 guess :)

  div class=time
div id=hello-button-11 class=linkbtn
  fb:hello font=arial width=100
 show_faces=false layout=button_count href=http://www.abc.com/
 elitegudz class= fb_edge_widget_with_comment
 fb_iframe_widgetspaniframe scrolling=no id=f545a8562f2a38
 name=f2cdf57ef4ea374 style=border: medium none; overflow: hidden;
 height: 20px; width: 100px; title=Like this content on Facebook.
 class=fb_ltr src=http://www.abc.com/

 plug;layout=button_countamp;locale=en_USamp;node_type=linkamp;sdk=joeyamp;show_faces=falseamp;width=100/
 iframe/span/fb:like
/div
div align=left class=americaairGudzbr
  b a target=_blank href=http://
 www.abc.com/http://www.abc.com//a a target=_blank href=http://
 www.abc.com/img src=http://www.time.com/templates/images/
 icon.gif/a /b /div
!--div class=icon/div--
  /div

 On Feb 17, 6:37 pm, Сергей Демьянчук sergeydemjanc...@gmail.com
 wrote:
  Try this code to see available properties for spans on the page :
 
  ie.spans.each do |span|
  span.flash
  span.to_s
  end
 
  Also this code works for me:
 
  ie.span(:text, 'Hello').flash
 
  If those spans are in the frame you possibly will need additional code to
  use.
 
  I suggest to use xpath to locate elements with same properties.
  What effect do you want to achieve clicking on the span ?
 
  2011/2/17 mike_sukhi sukhija...@gmail.com
 
 
 
   The code is:
 
   td class=connect_widget_vertical_center
   connect_widget_button_celldiv class=connect_button_sliderdiv
   class=connect_button_containera class=connect_widget_text_button
   clearfix time_button_no_timespan class=timeHello/span/a/
   div/div/td
 
   Hello appears 10 times on the page..with same code:
   I have tried with the following option but no success.
 
   $IE.span(:class ='time', :text ='Hello').click
   or
   $IE.span(:class ='time', :index=7).click
 
   still no sucess ...
 
   --
   Before posting, please readhttp://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
 http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

 --
 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
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] Re: Working with two browser instances in FireWatir

2011-02-03 Thread Сергей Демьянчук
Hi, Alastair Montgomery.


At the moment firewatir does not support multi browsers. FireWatir is using
jssh to send command's and to communicate with FireFox via JavaScript.
Unfortunately FireFox open socket and listed on port 9997 for JSSH purpose.
This port defined statically in the implementation of FireFox and can not be
redefined dynamicaly. There was some discussion on the official Mozilla
community about opportunity to use multiple profiles with multiple port and
this bug was fixed but only for later versions of FireFox 2.0.
I think watir-webdriver with watir is something that can help, cuz
watir-webdriver give an opportunity to use multiple instances of the FireFox
browser's.

-- 
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] Error while installing Watir on Windows 7

2010-11-29 Thread Сергей Демьянчук
I can say that it isn't an error, perhaps this warning messages tell that
not every gems functionality supported on Windows 7. I have same
notifications while setting up watir on Windows7, how ever, after
installations, watir works normally.
You can additionally use DevKit before any gem installation, see this
linkhttps://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
You can get latest DevKit from here http://rubyinstaller.org/downloads.

Best regards,
Sergii

2010/11/29 abhirevo1 abhi.r...@gmail.com

 Hi

 I just wanted to share a problem before you so i am here.While installing
 watir on my windows 7 machine, i came across the attached screen when used
 command -gem install watir.I am not sure whether this is an error or
 everything is all right .
 Please have a look at attached file and let me know is it an error?

 thanks
 abhirevo

 --
 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.comwatir-general%2bunsubscr...@googlegroups.com


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