[wtr-general] Re: Running Watir suite from Hudson

2009-05-22 Thread al3kc

I
--~--~-~--~~~---~--~~
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: Running Watir suite from Hudson

2009-05-22 Thread al3kc

I think the Batch Task is all you need to run your tests. This plugin
should be installed by default.
--~--~-~--~~~---~--~~
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: Running Watir suite from Hudson

2009-05-22 Thread karim rayani

yeh watircraft does the same. we need to define the tasks in the spec
folder and run with the command rake rspec. i did try it for a couple
of tasks

On Fri, May 22, 2009 at 12:50 PM, al3kc aleks.kiev...@gmail.com wrote:

 I think the Batch Task is all you need to run your tests. This plugin
 should be installed by default.
 




-- 
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: os and browser version

2009-05-22 Thread Željko Filipin
Looks like REGEXPTITLE works only on machines where full autoit is
installed, not just AutoItX3.dll. I have played with it for hours yesterday,
and that is what I have found.

From http://www.autoitscript.com/autoit3/docs/intro/installdir.htm:

AutoItX: Contains a DLL version of AutoIt v3 that provides a subset of the
features of AutoIt via an ActiveX/COM and DLL interface.

Željko

--~--~-~--~~~---~--~~
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: gmail tutorial example doesn't work

2009-05-22 Thread Željko Filipin
On Fri, May 22, 2009 at 2:09 AM, MatchBook jeffrey.fl...@gmail.com wrote:
 I was burnishing my watir skills and I noticed that this example
 didn't work.

Gmail changes a lot and it is really complicated. I would not recommend it
for beginners. If you are familiar with Watir, then maybe.

I have also noticed that flashing sometimes does not work, but you can
access the element regardless.

Željko

--~--~-~--~~~---~--~~
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: how simulate click the calendar day?

2009-05-22 Thread Željko Filipin
On Fri, May 22, 2009 at 5:53 AM, lnl lianglina_2...@sohu.com wrote:
 In date control,I could simulate select 'year',select 'month',
 but how to simulate click the day?

And you expect us to guess how your date control looks like? :)

Please, share a link, html and/or screen shot (all three if possible). Also,
your code that selects a year and month would be handy. Not to forget, the
code that fails to select a day, and error message, if you got one.

Željko

--~--~-~--~~~---~--~~
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] How can we enter data in excel sheet?

2009-05-22 Thread Durgesh Nadkarni
Hi,

I am using following code to check the validaity of different user inputs
using data driven test.


require 'test/unit'
require 'xls'
require 'watir'

class Gmail  Test::Unit::TestCase
 def test_Gmail_Working

  xlFile = XLS.new(Dir.pwd + '/Stopwords-List.xls') #grab the data file in
the same

dirrectory
  myData = xlFile.getRowRecords('Stopwords list','Stopwords')  #pull data
records from excel
  xlFile.close

  #Open IE and navigate to site
  ie = Watir::IE.new
  ie.goto http://www.acs.org/;

  # Click the link 'Journals'
  ie.link(:text, Journals).click
  sleep 1

  # starting loop
  myData.each do |record|

  #Search text field
  ie.text_field(:name, searchText).set(record['Stopwords'])
  ie.button(:name, searchSub).click

  # Verify that page contains text

if(ie.text.include?(record['Expected Result']))
  puts Stopword '#{record['Stopwords']}' excluded successfully
# Want to put Passed in excel sheet if the case pass
else
  puts Stopword '#{record['Stopwords']}' not excluded
# Want to put Failed in excel sheet if the case fails
   end

  sleep 2

  end

  # Close the browser
  ie.close
 end
end
-

As I am picking up data from an excel sheet from column 'Expected Result'
and depending upon the result I want to update the same excel sheet in the
column 'Actual Result' for corresponding rows.

Please help me on above.

Thanks  Regards
Durgesh.

--~--~-~--~~~---~--~~
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: Controlling JavaScript Pop Ups without .click_no_wait

2009-05-22 Thread satish

Hi Bill,

Which version of Ruby are you using.?
If you are using build 27, click_no_wait does not work. Same thing
happened to me too. I rolled it back to 26 and every thing works fine.

Try that..

Thanks
Satish

On May 21, 12:15 pm, suri sureshreddy@gmail.com wrote:
 Hi all,
 In my application, when I enter some invalid data in  text_field an
 alert will warn. I have to close that popup. I tried to write
 set_no_wait for text field but it is not working. I tried the same
 code for check box,radio button it is working fine. Please help me to
 write the set_no_wait for text_field and list box.

 module Watir
 class Element
  def set_no_wait
             assert_enabled
             highlight(:set)
             object = #{self.class}.new(self, :unique_number,
 #{self.unique_number})
             @page_container.eval_in_spawned_process(object + .set)
             highlight(:clear)
         end
     end
 end

 Regards
 Siva Phaneendra Krapa

 On Apr 20, 2:02 pm, Wesley Chen cjq@gmail.com wrote:



  Thanks, I make few changes and get it down. :)
  Now, we can use click_no_wait, select_no_wait, set_no_wait.

  module Watir
      class Element

          #select_no_wait - selects a drop-down element spawning a new
  process.
          #this is needed to close potential pop-ups that select drop-down can
  trigger.
          def set_no_wait
              assert_enabled
              highlight(:set)
              object = #{self.class}.new(self, :unique_number,
  #{self.unique_number})
              @page_container.eval_in_spawned_process(object + .set)
              highlight(:clear)
          end
      end
  end- 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: Running Watir suite from Hudson

2009-05-22 Thread Lisa Crispin
We don't use Watircraft or rspec, but I'll look into that batch task.
Thanks!
-- Lisa

On Fri, May 22, 2009 at 1:33 AM, karim rayani karim@gmail.com wrote:


 yeh watircraft does the same. we need to define the tasks in the spec
 folder and run with the command rake rspec. i did try it for a couple
 of tasks

 On Fri, May 22, 2009 at 12:50 PM, al3kc aleks.kiev...@gmail.com wrote:
 
  I think the Batch Task is all you need to run your tests. This plugin
  should be installed by default.
  
 



 --
 Regards,

 Alkarim Rayani

 



-- 
Lisa Crispin
Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
and Agile Teams_ (Addison-Wesley 2009)
http://lisacrispin.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] Validate Text in an HTML page source

2009-05-22 Thread fandi

Hi all,
I have been able to find a text string in a web page by using
ie.text.include?
However, I have not been able to find a simple solution to finding
text string in an HTML page source. Specifically, I am trying to
detect if there is a javascript error that would show up in the source
when a specific cross-site scripting vector is introduced in a URL but
won't and can't be seen in the web page.
For example, from the following URL I am expecting that a javascript
error would occur and the expected vector will be in the HTML source:
http://someserver:123/test.jsp?Application=app1%e9%a0%812%22%3e%3cp+OnMoUsEoVeR%3dalert('XSS')%3e

In the outcome from this URL execution, my goal is to be able to find
the ('XSS') string in the HTML page source and report the pass or
fail base upon that.

Any idea and help with examples would be much appreciated.

Thank you.
fandi

--~--~-~--~~~---~--~~
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: Running Watir suite from Hudson

2009-05-22 Thread marekj

Yes Lisa, I am using Hudson wit ci_reporter for harvesting
'test/reports/*.xml' files
I have Rake plugin running the test.
every test sits in a Rakefile in the follwing format

task :name_of_test = [:set_ci_reporter] do
  require 'file_with_testcase_file'
  TestRunner.run TestCaseClassName # this may not be needed
end

# this is ci_reporter infrastructure

desc 'set ci reporter precondition for tests'
task :set_ci_reporter = [:test_helper] do
  gem 'ci_reporter'
  require 'ci/reporter/rake/test_unit'
  load 'ci/reporter/rake/test_unit_loader.rb'
end

desc set test helper
task :test_helper do
  require 'rake/testtask'
  require 'rake/rdoctask'
  require 'test/unit/ui/console/testrunner'
  include Test::Unit::UI::Console
end


Hudson jobs are set up using custom workspace: I don't need to pull
them from cvs, svn etc... at every build.
and post build action is to publish junit test result report


marekj

Watirloo: Semantic Page Objects in UseCases
http://github.com/marekj/watirloo/




On Thu, May 21, 2009 at 6:32 PM, Lisa Crispin lisa.cris...@gmail.com wrote:
 Is anyone using Hudson to run their Watir suites? Is there a Hudson plugin
 for Watir?

 We've always run our suites from the DOS window, using testrunner (we use
 the test/unit framework). But we really need to get it into a scheduled
 build. We can run it on a slave Windows vm from Hudson, but we aren't sure
 how to be able to see the results.

 Thanks,
 Lisa

 --
 Lisa Crispin
 Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
 and Agile Teams_ (Addison-Wesley 2009)
 http://lisacrispin.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
-~--~~~~--~~--~--~---