[wtr-general] `assert_exists': Unable to locate element in watir

2013-04-10 Thread Suma Varada
Hi I am trying to use the drag and drop funtionality,as I run the script
 
require rubygems
require watir
browser = Watir::Browser.new
browser.goto xyz
browser.a(:text = Profile Package).flash
browser.a(:text = Profile Package).click
puts browser.select_list(:name = 'lstTemplates').options
browser.select_list(:name = 'lstTemplates').select 'ProfilesTemplate.docx'
x = browser.li(:text,'Juliana Abdo')
y = browser.li(:xpath = //*[@id='clsProfiles_selectedContent'])
x.drag_and_drop_on y
browser.button(:value = Create Document).flash
browser.button(:value = Create Document).click
 
 
 I get this C:\Ruby200\bin\ruby.exe -e 
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) 
C:/Users/Windows7Default/RubymineProjects/External website/Proposal 
Generator/ProfilePackage
DL is deprecated, please use Fiddle
id:   
id:   
id:   
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/element.rb:328:in
 
`assert_exists': Unable to locate element, using {:tag_name=[li], 
:xpath=//*[@id='clsProfiles_selectedContent']} 
(Watir::Exception::UnknownObjectException)
 from 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:61:in
 
`assert_target'
 from 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:14:in
 
`block in drag_and_drop_on'
 from 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/element.rb:477:in
 
`perform_action'
 from 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-classic-3.6.0/lib/watir-classic/drag_and_drop_helper.rb:13:in
 
`drag_and_drop_on'
 from C:/Users/Windows7Default/RubymineProjects/External website/Proposal 
Generator/ProfilePackage:14:in `top (required)'
 from -e:1:in `load'
 from -e:1:in `main'
Process finished with exit code 1
 
 
*The Html code for this particular section is as follows :*
 
div class=selectionRegionGroup
script type=text/javascript
div class=selectionRegion
ul id=clsProfiles_selectedContent class=contentList ui-sortable 
unselectable=on style=-moz-user-select: none; /ul
/div
div class=selectionRegion
ul id=clsProfiles_availableContent class=contentList ui-sortable 
unselectable=on style=-moz-user-select: none;
li id=108168 class=clsProfilesAvailableItem Juliana Abdo /li
li id=10737421935 class=clsProfilesAvailableItem Lisa Abe-Oldenburg /
li
li id=108171 class=clsProfilesAvailableItem Ranjan Agarwal /li

 
I need to drag and drop entries from  clsProfiles_availableContent   to 
clsProfiles_selectedContent

-- 
-- 
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] `assert_exists': Unable to locate element

2010-08-13 Thread cyril.gonsal...@mastek.com
Hi,

I am writing script for a testcase below.

1. Open Link abc.htm
2. Click link chat me on abc.htm
3. Enter text in the testfield on the newly opened page
4. Click submit button

While written script for above like this


# Reuired libraries

  require 'watir'

  site_text = http://localhost:8080/XXX/a.htm;
  ie = Watir::IE.new
  ie.goto(site_text)
  ie.link(:text,Chat me).click

ie.text_field(:name,entry).set abc # text field on the opened link


I get below error messge :

`assert_exists': Unable to locate element, using :name,
entry (Watir::Exception::UnknownObjectException)
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
288:in `enabled?'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
60:in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
input_elements.rb:327:in `set'
from D:/Ruby/rbC1.tmp:15
Complete(1)


The problem could be because of the new browser window.

if yes then how to access objects e.g textfield in the browser i.e.
opened by clicking the link in another browser

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] `assert_exists': Unable to locate element

2010-08-13 Thread Željko Filipin
On Fri, Aug 13, 2010 at 1:21 PM, cyril.gonsal...@mastek.com 
cyril.gonsal...@mastek.com wrote:
 if yes then how to access objects e.g textfield in the browser i.e.
 opened by clicking the link in another browser

You want to attach to another browser window?

http://wiki.openqa.org/display/WTR/New+Browser+Windows

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them
vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


RE: [wtr-general] `assert_exists': Unable to locate element

2010-08-13 Thread Cyril A. Gonsalves
Gr8 work dude……

Really helpful
MASTEK LTD.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
desktop and server.
~~

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] `assert_exists': Unable to locate element

2010-08-13 Thread arihan sinha
you have to attach that new windows, do the activities and then close that
and come back to your original browser.

in my ruby+watir framework I use the below if any new window opens where i
need to do anything

if attach_url(/url in reg exp/) then

enter_text_into_text_field_text(Enter the value in text field, entry,
abc)

# do what ever you want to do in this new window
# then close this new window
end

the attach_url and enter_text_into_text_field are called from testbase.rb

def enter_text_into_text_field_text(title, name, value)
  startAction title, type ' + value + ' in ' + name + ' text field

  if no_fatal_error then
   begin
  $ie.text_field(:name, name).set(value)
  logPass
  rescue = e
   handleFail e
  end
  end
 end

def attach_url(urlName)
  startAction opening new IE instance, urlName.to_s
  if no_fatal_error then
  begin
  new_ie = Watir::IE.attach(:url, urlName)
  new_ie.set_fast_speed
  @stored_ie = $ie
  $ie = new_ie
  logPass
  return true
  rescue = e
  @fatal_error=true
   handleFail e
  end
  end

  return false
end

On Fri, Aug 13, 2010 at 12:21 PM, cyril.gonsal...@mastek.com 
cyril.gonsal...@mastek.com wrote:

 Hi,

 I am writing script for a testcase below.

 1. Open Link abc.htm
 2. Click link chat me on abc.htm
 3. Enter text in the testfield on the newly opened page
 4. Click submit button

 While written script for above like this


 # Reuired libraries

  require 'watir'

  site_text = http://localhost:8080/XXX/a.htm;
  ie = Watir::IE.new
  ie.goto(site_text)
  ie.link(:text,Chat me).click

 ie.text_field(:name,entry).set abc # text field on the opened link


 I get below error messge :

 `assert_exists': Unable to locate element, using :name,
 entry (Watir::Exception::UnknownObjectException)
from
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
 288:in `enabled?'
from
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
 60:in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
 input_elements.rb:327:in `set'
from D:/Ruby/rbC1.tmp:15
 Complete(1)


 The problem could be because of the new browser window.

 if yes then how to access objects e.g textfield in the browser i.e.
 opened by clicking the link in another browser

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

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 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.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


RE: [wtr-general] `assert_exists': Unable to locate element

2010-08-13 Thread Cyril A. Gonsalves
Thanks a lot for useful info...
MASTEK LTD.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
desktop and server.
~~

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] `assert_exists': Unable to locate element

2009-02-05 Thread RK

Hi Frnd,

I have updated ruby  Watir from 1.5.3 to 1.6.2 and getting below
issues.
Code:
require 'rubygems'
require 'watir'
@@browser = Watir::IE.new()
@@browser.goto(www.google.com)
@@browser.text_field(:name,'q').set('watir')
@@browser.close

Issues :
1)  It Opens two browser windows( Blank  Google)

2) c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
52:in `assert_exists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
from Basic.rb:9

Looking for Help..

Regards
RK

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