[wtr-general] 2011 Google Test Automation Conference

2011-07-21 Thread George
Hi there,

I was just wondering if anyone from the Watir community will be
attending this conference in Mountain View, CA:

http://www.gtac.biz/

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread sachin marne
Bascially I want to select value from dropdown and on selecting the
value jquery event get fired and some UI changes.But in my automation
i can only change the values from dropdown UI doen't changes.

I tried following code

 
@browser.select_list(:id,'OTRHeader1_sellightBoxSelect').select(data[i]
[0])
 @browser.select_list(:id,'sellightBoxSelect').fire_event(change)

my source code is..

DOM SOURCE CODE - Basically it is a User control so id is selectlist
id is get concat with Header1_+ sellightBoxSelect

select name=Header1$sellightBoxSelect
id=Header1_sellightBoxSelect class=lightBoxSelect style=font-
size: 13px; vertical-align: top;
option value=10240Aurora Bistro/optionoption
value=18082Cocina Poblana Emeryville/optionoption
value=1004Coco Pazzo/optionoption value=10177Indian Summer/
optionoption value=10200Market - Paris/optionoption
value=7584Vista Grill/option/select


JQUERY  -


 $('select[id$=sellightBoxSelect]').change(function () {
//set Acct# in User Details section
$('dd[id$=ddAcctNo]').text($('select[id
$=sellightBoxSelect]').val());

//set acc mgr details
SetAccMgrDetails();

//draw piechart
GetPieChart();
});



but i m falied to fire the events..

Please help me as soon as possible.

Thanks,

Sachin Marne

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread Željko Filipin
On Thu, Jul 21, 2011 at 12:07 PM, sachin marne sachinmarn...@gmail.com
wrote:
 but i m falied to fire the events..

Maybe this would help:

http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread sachin marne
Thanks For Replay,

But i have jquery code the change function is get called,

$('select[id$=
sellightBoxSelect]').change(function () {
   //set Acct# in User Details section
   $('dd[id$=ddAcctNo]').text($('select[id
$=sellightBoxSelect]').val());

   //set acc mgr details
   SetAccMgrDetails();

   //draw piechart
   GetPieChart();
   });

so i tried

 @browser.select_list(:id,'sellightBoxSelect').fire_event(change)

but not working.


Please help me out.

On Thu, Jul 21, 2011 at 3:14 AM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:
On Thu, Jul 21, 2011 at 12:07 PM, sachin marne sachinmarn...@gmail.com
wrote:
 but i m falied to fire the events..

Maybe this would help:

http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired





Željko
 --
 watir.com - community manager
 watir.com/book - author
 watirpodcast.com - host

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


[wtr-general] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread sachin marne
But i have jquery code the change function is get called,


$('select[id$=
sellightBoxSelect]').change(function () {
   //set Acct# in User Details section
   $('dd[id$=ddAcctNo]').text($('select[id
$=sellightBoxSelect]').val());


   //set acc mgr details
   SetAccMgrDetails();


   //draw piechart
   GetPieChart();
   });


so i tried


 @browser.select_list(:id,'sellightBoxSelect').fire_event(change)


but not working.


Please help me out.


On Thu, Jul 21, 2011 at 3:14 AM, Željko Filipin 


zeljko.fili...@wa-research.ch wrote:


On Thu, Jul 21, 2011 at 12:07 PM, sachin marne
sachinmarn...@gmail.com
wrote:


 but i m falied to fire the events..


Also tried
@browser.document.parentWindow.execScript('jQuery(#sellightBoxSelect).trigger(change)')

plz help me 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


Re: [wtr-general] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread Željko Filipin
On Thu, Jul 21, 2011 at 12:19 PM, sachin marne sachinmarn...@gmail.com
wrote:
 so i tried
  @browser.select_list(:id,'sellightBoxSelect').fire_event(change)
 but not working.

Try this:

@browser.select_list(:id,'sellightBoxSelect').fire_event(onchange)

Željko

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread sachin marne
hi,

i tried for

@browser.select_list(:id,'sellightBoxSelect').fire_event(onchange)


its throwing

Watir::Exception::UnknownObjectException: Unable to locate element,
using :id, sellightBoxSelect exception


But i have select box with id


h1 class=lightBoxTitle
Welcome Back, span class=userName id=spanUserName
runat=server/span
select id=sellightBoxSelect runat=server
class=lightBoxSelect style=font-size:13px;vertical-align:top;
/select
span id='spanSingleRest' runat='server'
class='lightBoxSelect'/span
span id='spanhidSingleWebID' runat='server'
class='lightBoxSelect' visible='false'/span
/h1

and jquery also

 $('select[id$=sellightBoxSelect]').change(function () {
//set Acct# in User Details section
$('dd[id$=ddAcctNo]').text($('select[id
$=sellightBoxSelect]').val());

//set acc mgr details
SetAccMgrDetails();

//draw piechart
GetPieChart();
});

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread Željko Filipin
On Thu, Jul 21, 2011 at 12:52 PM, sachin marne sachinmarn...@gmail.com
wrote:
 Watir::Exception::UnknownObjectException: Unable to locate element,
 using :id, sellightBoxSelect exception

Is it in a frame?

In that case you have to explicitly say which one:

@browser.frame(how,
what).select_list(:id,'sellightBoxSelect').fire_event(onchange)

http://wiki.openqa.org/display/WTR/Frames

 But i have select box with id

Is that from view source or did you check if select list is on the page
with a tool like Firebug?

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
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] Failed to handle Jquery event of dropdown in watir cucumber automation.

2011-07-21 Thread sachin marne
its inside the div

div id=boxWrapper
h1 class=lightBoxTitle
Welcome Back, span class=userName id=spanUserName
runat=server/span
select id=sellightBoxSelect runat=server
class=lightBoxSelect style=font-size:13px;vertical-align:top;
/select
span id='spanSingleRest' runat='server'
class='lightBoxSelect'/span
span id='spanhidSingleWebID' runat='server'
class='lightBoxSelect' visible='false'/span
/h1
div id=colLeft

-- 
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: Jssh Socket error

2011-07-21 Thread Aditya
any update on this please let me know

On Fri, Jul 8, 2011 at 6:20 PM, V vaditya2...@gmail.com wrote:

 For IE already raised a post. check this Unable to Maximize the IE 8,
 Received error while executing the script
 So i shifted to Firefox
 but still i need that solution as i am planning for a framework . I
 need that. Earlier version of watir was working fine. But not in this.
 May be my environment issue. but i was unable to figure it out. Any
 how i  need the solution.
 Let me know.

 On Jul 8, 5:37 pm, Amit Bobade amit.sr...@gmail.com wrote:
  Hi,
 
  To maximize the IE browser, try this:
 
  require 'rubygems'
  require 'Watir'
 
  ie = Watir::IE.new
   ie.goto(http://www.google.com;)
   ie.maximize
 
  For other browsers, I am trying to find out the solutions.
 
  Thanks,
  -Amit
 
 
 
  On Fri, Jul 8, 2011 at 5:24 PM, Aditya vaditya2...@gmail.com wrote:
   Thanks for the information. But what about the rest i asked for? How
 can i
   maximize the browser and the rest?
 
   And Also i want to pass the browser as a parameter and at run i can
   verify for IE,Firefox and safari. So i planned. I worked on this
   earlier but now the solution is specific to fire fox. if you change ie
   in that you still see the firefox opening rather ie. So i need this.
   help me in this as well.
 
   On Fri, Jul 8, 2011 at 11:00 AM, Amit Bobade amit.sr...@gmail.com
 wrote:
 
   hi,
 
   browser = Watir::Browser.new :ff   - Why do we need to have FF here?
 
   You can have :chrome and : ie also.
 
   Thanks,
   -Amit
 
   On Thu, Jul 7, 2011 at 7:43 PM, V vaditya2...@gmail.com wrote:
 
   How do i maximize the FF window?
 
   I need to replace the browser every time i execute. How?
 
   browser = Watir::Browser.new :ff   - Why do we need to have FF here?
 
   On Jul 7, 6:58 pm, V vaditya2...@gmail.com wrote:
Changed as
require rubygems
require 'watir'
require 'watir-webdriver'
 
def defaultbrowser(br)
#~ require 'watir-webdriver'
 Watir::Browser.default=br
puts Default Browser: +Watir::Browser.default
end
 
def setdefaultbrowser(br)
 
br=Watir::Browser.new
 
end
 
br= 'ie' #'safari', 'firefox', or 'ie'
  #URL=
  #~ defaultbrowser(br)
  setdefaultbrowser(br)
 
is occuring the following error
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir-
webdriver/version.rb:2: warning: already initialized constant
 VERSION
C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir-
webdriver/exception.rb:8: superclass mismatch for class
UnknownObjectException (TypeError)
from
   C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from
   C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from
   C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/
watir-webdriver.rb:7
from
   C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
59:in `gem_original_require'
from
   C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
59:in `require'
 
Removed Watir
require rubygems
#require 'watir'
require 'watir-webdriver'
 
def defaultbrowser(br)
#~ require 'watir-webdriver'
 Watir::Browser.default=br
puts Default Browser: +Watir::Browser.default
end
 
def setdefaultbrowser(br)
 
br=Watir::Browser.new
 
end
 
br= 'ie' #'safari', 'firefox', or 'ie'
  #URL=
  #~ defaultbrowser(br)
  setdefaultbrowser(br)
 
Executed ... Thanks But i need to replace the browser every time i
execute. How?
 
browser = Watir::Browser.new :ff   - Why do we need to have FF
 here?
 
On Jul 7, 6:51 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 
 On Thu, Jul 7, 2011 at 3:20 PM, V vaditya2...@gmail.com wrote:
  exceptions.rb:12: superclass mismatch for class
   UnknownObjectException
  (TypeError)
 
 You require both watir and watir-webdriver in your script.
 Require
   only
 watir-webdriver.
 
 Željko
 
   --
   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-generalwatir-general+unsubscribe...
 
   --
   Thanks and Regards,
   Amit
 
--
   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
 
--
   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
 
  --
  Thanks and Regards,
  Amit

 --
 Before 

[wtr-general] Chrome is getting closed even I do not use browser.close() method.

2011-07-21 Thread Amit Bobade
Dear all:

I am facing problem with chrome browser. My scripts are running properly but
Chrome browser is getting closed even I do not use *browser.close()* method.
This is a problem with Chrome only, FF and IE are working as expected.

I am using Watir-webdriver. Please tell me know the solution.  Thanks in
advance.

-- 
Thanks and Regards,
Amit

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