[wtr-general] Re: how to get slectlist box option value

2011-02-24 Thread Chuck van der Linden
On Feb 24, 10:28 pm, Rajiv Nanduani 
wrote:
> Hi All,
>
> I am facing a problem with watir for list box object. I have to extrach the
> value of select item in list box instead of text value Like..
>
> 
>             - Select One --
>             Mobile Phone
>             Daytime Phone
>             Evening Phone
>         
>
> Here i need the value property value like M , O , H
>
> please suggest how to get this value using watir/ruby


The way to get this value is as follows:

1) access the RDoc file for Watir  (http://rdoc.info/gems/watir/1.7.0/
frames)

2) look up the "selectlist" element

3) scan the documentation for selectlist until you notice that there's
a specific example given in this section
http://rdoc.info/gems/watir/1.7.0/Watir/SelectList:option
 which shows how to get the value given the displayed text.

4) write code based on the example given.

5) if that fails, ask on the watir group, providing sample of the HTML
(check, already did that), the code you tried, and the results you got
including any error messages.


The RDoc is your friend, many of the answers you seek are waiting
there for you to find, if you but search.

-- 
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 to get/retrieve value

2011-02-24 Thread Tim Koopmans
Chuck actually I tend to agree with all your comments there. I've been
away from wtr-general for a while and am now amazed (after a week of
trawling) at the quality, or lack-thereof, of requests for help.

In hindsight, maybe he should just try
gem install captchavundarbarbreaker

Still, I always like a challenge and was tempted to put more thought
into it. Maybe next time =)


Cheers,
Tim



On Fri, Feb 25, 2011 at 6:23 PM, Chuck van der Linden  wrote:
> Tim,
>
> I'm not saying he's a spammer..  (but one could be watching)
>
> I'm applying the LART with such vigor because he's been told about 4
> times 'can't do that' and he keeps asking as if we're not telling him
> the truth or the answer will somehow change, or there is some 'secret
> solution' using some 'magic gem' that we're just not telling him
> about.
>
> (sh don't tell anyone, but if you find the config.sys file and put
> "User equals-sign ID ten T" on the first line in that file that will
> make it work)
>
> and btw  if he CAN break the captcha using any of the tools you
> suggest, I'd recommend he notify his client that they need a better
> captcha, since if it wont stop him, then it's not likely to stop the
> spammers.
>
> BTW  want to know how spammers break captchas?  they crowdsource it.
> They pay people in lesser developed nations something like a tenth of
> a cent per captcha solved.  they use scripts that capture that part of
> the screen, send the image to a system that sends it to someone logged
> into to it who 'solves' the puzzle and sends the 'solution' back to
> the spammer's script where it is entered and then they can submit
> their spam.  since most captchas are just random numbers and letters
> you dont even have to speak a foreign language to get such a job..
>
> http://www.nytimes.com/2010/04/26/technology/26captcha.html?_r=1&hpw
>
> So assuming that his client wants to pay for this service, there is a
> way around it (which as I said, puts a human in the loop)
>
> On Feb 23, 2:14 am, Tim Koopmans  wrote:
>> So let's just go easy on the guy!
>>
>> It's not an entirely unreasonable request, and not really up to us to judge
>> it. It may well be legit!
>>
>> Depending on the quality of the CAPTCHA it may in fact be possible. But
>> you'd probably have to wrap in an OCR library with some image processing (to
>> TIFF) beforehand.
>>
>> For image processing I'd recommend rmagick[1].
>> For OCR you could look at gocr[2], ocrad[3] or tesseract[4]
>>
>> [1]http://rmagick.rubyforge.org/
>> [2]http://jocr.sourceforge.net/
>> [3]http://www.gnu.org/software/ocrad/
>> [4]http://code.google.com/p/tesseract-ocr/
>>
>> Good luck with that!
>>
>> Cheers,
>> Tim
>>
>> On Wed, Feb 23, 2011 at 8:07 PM, Chuck van der Linden 
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > THERE IS NO SUCH GEM.
>>
>> > NO.  HELL NO. and a Thousand Times I tell you NO.
>>
>> > The purpose of a captcha is a challenge to prove that it is a human at
>> > the computer, to prevented scripted attacks on the site from spammers
>> > and the like.  The site cannot tell a scripted interaction from a
>> > tester from a scripted interaction from a spammer or other attacker.
>>
>> > if the client needs you to test against production then you need to
>> > test pages with a captcha manually, or they would need to temporarily
>> > disable the captcha for the duration of the test, or set it to use a
>> > fixed answer for the duration of the test.
>>
>> > You CANNOT script against a working captcha without a human in the
>> > loop.  That's the design and purpose of a captcha.  And if you somehow
>> > found a way to do that, then the client needs a better quality
>> > captcha, because if you can figure out a way, so will the spammers.
>>
>> > NOBODY who isn't a spammer is likely to develop a means to get around
>> > captchas because we know it would then be immediately discovered and
>> > used BY spammers, and nobody wants to help spammers.  Nobody here is
>> > going to help YOU do the same thing for the same reason, even if you
>> > are not a spammer, one could come along later and read the answer.
>> > stop trying to go there.
>>
>> > Likewise, there is no way for the site to know your scripted
>> > interaction (against a production site) is 'safe' that would not
>> > potentially be used or exploited by spammers.. so I strongly
>> > discourage anything along those lines as it would just be introducing
>> > a chink in the sites defenses that could later be exploited to attack
>> > the site.
>>
>> > If your client is asking you to write scripting against pages with
>> > captchas, point out to them that this is a bit like asking you to move
>> > an object they designed to be immovable.
>>
>> > On Feb 22, 9:15 am, Aditya  wrote:
>> > > A good idea already thinking the same. But the client needs on production
>> > > environment too. So do we have any gem atleast once the page is loaded
>> > can
>> > > we get the value after page is displayed? Any idea ?
>>
>> > > On Tue, Feb 22, 2011 at 7:36 

[wtr-general] Re: Need to get/retrieve value

2011-02-24 Thread Chuck van der Linden
Tim,

I'm not saying he's a spammer..  (but one could be watching)

I'm applying the LART with such vigor because he's been told about 4
times 'can't do that' and he keeps asking as if we're not telling him
the truth or the answer will somehow change, or there is some 'secret
solution' using some 'magic gem' that we're just not telling him
about.

(sh don't tell anyone, but if you find the config.sys file and put
"User equals-sign ID ten T" on the first line in that file that will
make it work)

and btw  if he CAN break the captcha using any of the tools you
suggest, I'd recommend he notify his client that they need a better
captcha, since if it wont stop him, then it's not likely to stop the
spammers.

BTW  want to know how spammers break captchas?  they crowdsource it.
They pay people in lesser developed nations something like a tenth of
a cent per captcha solved.  they use scripts that capture that part of
the screen, send the image to a system that sends it to someone logged
into to it who 'solves' the puzzle and sends the 'solution' back to
the spammer's script where it is entered and then they can submit
their spam.  since most captchas are just random numbers and letters
you dont even have to speak a foreign language to get such a job..

http://www.nytimes.com/2010/04/26/technology/26captcha.html?_r=1&hpw

So assuming that his client wants to pay for this service, there is a
way around it (which as I said, puts a human in the loop)

On Feb 23, 2:14 am, Tim Koopmans  wrote:
> So let's just go easy on the guy!
>
> It's not an entirely unreasonable request, and not really up to us to judge
> it. It may well be legit!
>
> Depending on the quality of the CAPTCHA it may in fact be possible. But
> you'd probably have to wrap in an OCR library with some image processing (to
> TIFF) beforehand.
>
> For image processing I'd recommend rmagick[1].
> For OCR you could look at gocr[2], ocrad[3] or tesseract[4]
>
> [1]http://rmagick.rubyforge.org/
> [2]http://jocr.sourceforge.net/
> [3]http://www.gnu.org/software/ocrad/
> [4]http://code.google.com/p/tesseract-ocr/
>
> Good luck with that!
>
> Cheers,
> Tim
>
> On Wed, Feb 23, 2011 at 8:07 PM, Chuck van der Linden wrote:
>
>
>
>
>
>
>
> > THERE IS NO SUCH GEM.
>
> > NO.  HELL NO. and a Thousand Times I tell you NO.
>
> > The purpose of a captcha is a challenge to prove that it is a human at
> > the computer, to prevented scripted attacks on the site from spammers
> > and the like.  The site cannot tell a scripted interaction from a
> > tester from a scripted interaction from a spammer or other attacker.
>
> > if the client needs you to test against production then you need to
> > test pages with a captcha manually, or they would need to temporarily
> > disable the captcha for the duration of the test, or set it to use a
> > fixed answer for the duration of the test.
>
> > You CANNOT script against a working captcha without a human in the
> > loop.  That's the design and purpose of a captcha.  And if you somehow
> > found a way to do that, then the client needs a better quality
> > captcha, because if you can figure out a way, so will the spammers.
>
> > NOBODY who isn't a spammer is likely to develop a means to get around
> > captchas because we know it would then be immediately discovered and
> > used BY spammers, and nobody wants to help spammers.  Nobody here is
> > going to help YOU do the same thing for the same reason, even if you
> > are not a spammer, one could come along later and read the answer.
> > stop trying to go there.
>
> > Likewise, there is no way for the site to know your scripted
> > interaction (against a production site) is 'safe' that would not
> > potentially be used or exploited by spammers.. so I strongly
> > discourage anything along those lines as it would just be introducing
> > a chink in the sites defenses that could later be exploited to attack
> > the site.
>
> > If your client is asking you to write scripting against pages with
> > captchas, point out to them that this is a bit like asking you to move
> > an object they designed to be immovable.
>
> > On Feb 22, 9:15 am, Aditya  wrote:
> > > A good idea already thinking the same. But the client needs on production
> > > environment too. So do we have any gem atleast once the page is loaded
> > can
> > > we get the value after page is displayed? Any idea ?
>
> > > On Tue, Feb 22, 2011 at 7:36 PM, Basim Baassiri 
> > wrote:
> > > > I've had a similar problem in automating a signup page that had a
> > captcha
> > > > on it.
>
> > > > I solved it by implementing in the production code to detect the test
> > > > environment and when the test environment was evaluated the captcha was
> > > > hardcoded to QAQA and hence i used that string to proceed with the
> > signup
> > > > page
>
> > > > Hopefully that can help you
>
> > > > On Tue, Feb 22, 2011 at 5:30 AM, Aditya  wrote:
>
> > > >> Thanks for the valuable information.
>
> > > >> Can i use rmagick gem in order to validate the cap

Re: [wtr-general] how to get slectlist box option value

2011-02-24 Thread Priya D
Try this

To select individual attribute :-

browser.select_list(:name, "phone_type").select("M")



On 25 February 2011 11:58, Rajiv Nanduani wrote:

> Hi All,
>
> I am facing a problem with watir for list box object. I have to extrach the
> value of select item in list box instead of text value Like..
>
> 
> - Select One --
> Mobile Phone
> Daytime Phone
> Evening Phone
> 
>
> Here i need the value property value like M , O , H
>
> please suggest how to get this value using watir/ruby
>
> --
> RAJIV KUMAR
>
> 
> 
>
>
>  --
> 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] how to get slectlist box option value

2011-02-24 Thread Rajiv Nanduani
Hi All,

I am facing a problem with watir for list box object. I have to extrach the
value of select item in list box instead of text value Like..


- Select One --
Mobile Phone
Daytime Phone
Evening Phone


Here i need the value property value like M , O , H

please suggest how to get this value using watir/ruby

-- 
RAJIV KUMAR




-- 
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] Re: Identify Flash Objects - to write

2011-02-24 Thread Chuck van der Linden
learn to assist yourself.

http://lmgtfy.com/?q=flash+watir

On Feb 24, 4:15 am, V  wrote:
> How do i identify flash objects as my firebug does not display
> those.Any add-on for flash objects?
>
> Say Ex: I opened app. A welcome screen came. Down the line there is "I
> AGREE" button. But unable to view the source. How do i overcome this?
>
> Assist 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.com


[wtr-general] Re: detecting elements of Overlay form in watir

2011-02-24 Thread Chuck van der Linden
As charlie said it's just a div that shows up for a while.  if you
know the properties of the div then you can check to see if it's
there.

Likely it's just being switched by some client side javascript from
being visible to not being visible.   If that's the case, again if you
know enough properties of the div you can use the .visible? method to
check and see if it's displayed or not..

On Feb 23, 8:19 am, Charley Baker  wrote:
> I'm not entirely sure what you mean by "overlay form", but on that
> page is a div that shows up for a bit to download IE8. It's simply a
> div with links. So something like
>
> browser.div(:id, 'lspTileContainer').link(:id, 'whatever').click
>
> Cheers,
>
> Charley Baker
> Lead Developer, Watir,http://watir.com
>
> On Wed, Feb 23, 2011 at 3:28 AM, Inder Pal Singh Parmar
>
>
>
>
>
>
>
>  wrote:
> > Hi all,
> > How can we detect a overlay form using Watir.
> > Say for example onhttp://www.microsoft.com/en/us/default.aspxthere is a
> > overlay form for downloading IE8.
> > how to detect controls on this overlay form.
> > thanks in advance.
> > Inder Pal
>
> > --
> > 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 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] Re: EXCEL how to array only one value from a range when A=B

2011-02-24 Thread Chuck van der Linden
Yes as others have pointed out, theres no watir in anythng you
provided, what you have are questions regarding how to use ruby..

a few small tips in terms of (at least from what I've seen) are the
ruby way of doing some of the code you have

if nu=region
 This is asking if "setting nu equal to region" is true.. it will
always be true
 instead you want to use:
if nu==region

style wise,
Instead of  :
  rowcount = worksheet.UsedRange.Rows.Count
  for j in 1..rowcount
{some code using j}
 end

use:
  worksheet.UsedRange.Rows.Count.times.do |j|
{some code using j }
  end

Instead of :
  num =worksheet.Cells(j, 1).value
  nu=num.round(0)
  if nu=region
puts worksheet.Cells(j, 2).value
  end

use:
  puts worksheet.Cells(j, 2).value  if worksheet.Cells(j,
1).value.to_i == region

On Feb 22, 7:52 pm, keneda 45  wrote:
> Hello,
>
> it's my file Excel :
>
> 10      "Limousin"
> 11      "Lorraine"
> 12      "Midi-Pyrénées"
> 13      "Nord-Pas de Calais"
> 14      "Basse Normandie"
> 15      "Haute Normandie"
> 16      Pays de la loire
> 17      "Picardie"
> 18      "Poitou-Charentes"
> 19      "Provence-Alpes-Côte d'Azur"
> 20      "Rhone-Alpes"
> 21      "Corse"
> 22      "Outre Mer et Etranger"
>
> and it's my script :
>
> require 'watir'
> require 'win32ole'
>
> puts "Choisir Region
>
> 10=Limousin
> 11=Lorraine
> 12=Midi-Pyrenees
> 13=Nord-Pas de Calais
> 14=Basse Normandie
> 15=Haute Normandie
> 16=Pays de la loire
> 17=Picardie
> 18=Poitou-Charentes
> 19=Provence-Alpes-Cote d'Azur
> 20=Rhone-Alpes
> 21=Corse
> 22=Outre Mer et Etranger
> ?"
> region=gets # I ask to enter a number between 10 to 22
>
> excel = WIN32OLE::new('excel.Application')
> excel.DisplayAlerts = false
> excel.Visible = 1
> workbook = excel.Workbooks.Open('C:\Ruby191\rv.xls')
>
> for i in 1 .. workbook.Worksheets.Count
>
>   worksheet = workbook.Worksheets(i)
>    rowcount = worksheet.UsedRange.Rows.Count
>   for j in 1..rowcount
>
> num =worksheet.Cells(j, 1).value
> nu=num.round(0)
>
> if nu=region
>
> puts worksheet.Cells(j, 2).value
>
> end
> end
> end
>
> with that script it array all worksheet.Cells(j, 2).value, I don't
> know how to array only worksheet.Cells(j, 2).value where nu=region
>
> Do you have an idea?
>
> thx

-- 
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] Re: Problem in installing Flash Watir

2011-02-24 Thread Chuck van der Linden
ask the firebug people.  or learn to read html

we are not firebug support.

AND STOP REPEAT POSTING THE SAME QUESTION UNDER DIFFERENT ID'S

On Feb 24, 2:04 am, Aditya  wrote:
> Thank you.
>
> How do i identify flash objects as my firebug does not display those.Any
> add-on for flash objects?
>
> Say Ex: I opened app. A welcome screen came. Down the line there is "I
> AGREE" button. But unable to view the source. How do i overcome this?
>
> On Thu, Feb 24, 2011 at 3:06 PM, Željko Filipin <
>
>
>
>
>
>
>
> zeljko.fili...@wa-research.ch> wrote:
> > 2011/2/24 Aditya 
>
> > > Any specific process to install the specific gem.
>
> > Download gem, open command prompt in folder where gem is downloaded, type:
>
> > gem install gem_name
>
> > (replace gem_name with the name of the gem, in this case flash_watir)
>
> > Ž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

-- 
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] Re: Problem in installing Flash Watir

2011-02-24 Thread Chuck van der Linden
On Feb 24, 1:34 am, Aditya  wrote:
> Any specific process to install the specific gem.
> How do i?
>

the same way you install any gem.

http://lmgtfy.com/?q=how+to+install+ruby+gems

-- 
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] Re: Can Watir support PHP based technology?

2011-02-24 Thread Chuck van der Linden
Like Z I think I'm perplexed here as to exactly what it is you are
wanting to do.

If the problem is elements not found on the page,  and it works
'manually' from an IRB prompt, but not when you run the script, you
might need to insert a few sleep statements here and there in your
code to allow for client side code on the page to render things.
That' common with pages with lots of javascript or sometimes heavy CSS
formatting.

Unfortunately unless your page code specifically provides some way to
know when it is busy manipulating stuff, vs when it is done, there is
really no way for Watir to when the clientside operations are done.

An example of what I mean by that is what the site I'm testing does,
it has a little animated 'loading' graphic it displays when its doing
things like updating the page via jquery, or running any client side
scripts. This 'icon' resides in a div, and the system sets it visible
while clent side code is running, and then hides it again once it's
done.  It's there for the users really, so they will know something is
going on, but that doesn't mean I can't use it also.  So what I'm able
to do in my automation is have a method I call that looks like this

def sleepWhileLoading
 while browser.div(:id, 'masterprogress').visible?
   sleep 1
 end
end

in my scripts, anyplace that i might need to wait for the jquery stuff
to update the page, or any other client side scripting to finish, I
just call that method.

If that's not your problem then..  'An example would be handy right
about now'

On Feb 24, 5:24 am, Željko Filipin 
wrote:
> On Thu, Feb 24, 2011 at 1:49 PM, Ashu  wrote:
> > Its working fine for me with HTML page
>
> But there is a problem inspecting the page of your PHP app?
>
> Ž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] Re: EXCEL how to array only one value from a range when A=B

2011-02-24 Thread Super Kevy
I assume your trying to read the excel sheet and not write to it
First look for XLS.rb and make life easy, then follow this code
fragment
XLS.rb has some nice methods to make life easier.

Alternatives are using ruby-roo


require 'rubygems'
require 'watir'
require './xls.rb'

#
# Assume a spreasheet named theSpreadsheet.xls
# It contains A header in A1 'LOGIN' and data in A2..A10.\
# It contains a Header in B2 'PASSWORD' and data in B2..B10
# That cell range was named Lookup_Terms in the spreadsheet
# The worksheets page is named: Terms
# XLS.rb will return a hash array to the main
#

def loadSpreadsheetData
sSpreadsheet='theSpreadsheet.xls'
sSheetname='Terms'
sRange='Lookup_Users'# or A1..A10
myData = []
myData=xls_GetTheRowData(myData,sSpreadsheet,sRange,sSheetname)
# This is a method in xls.rb
puts ' - Data Set Details'
puts ' - Spreadsheet Source: '+sSpreadsheet.to_s
puts ' - Data Range: '+sRange.to_s
puts ' - Sheet Name: '+sSheetname.to_s
puts ' - Rows: '+myData.length().to_s
puts ' '
return myData
end

myUser=[]
myUser=loadSpreadsheetData
iExcel=0
myUser.each {
  sLogin=myUser[iExcel].fetch('LOGIN').to_s
  sPassword=myUser[iExcel].fetch('PASSWORD'),to_s
  puts ' - Login: '+sLogin
  puts ' - Password: '+sLogin
  iExcel=iExcel+1
}
exit



On Feb 22, 9:52 pm, keneda 45  wrote:
> Hello,
>
> it's my file Excel :
>
> 10      "Limousin"
> 11      "Lorraine"
> 12      "Midi-Pyrénées"
> 13      "Nord-Pas de Calais"
> 14      "Basse Normandie"
> 15      "Haute Normandie"
> 16      Pays de la loire
> 17      "Picardie"
> 18      "Poitou-Charentes"
> 19      "Provence-Alpes-Côte d'Azur"
> 20      "Rhone-Alpes"
> 21      "Corse"
> 22      "Outre Mer et Etranger"
>
> and it's my script :
>
> require 'watir'
> require 'win32ole'
>
> puts "Choisir Region
>
> 10=Limousin
> 11=Lorraine
> 12=Midi-Pyrenees
> 13=Nord-Pas de Calais
> 14=Basse Normandie
> 15=Haute Normandie
> 16=Pays de la loire
> 17=Picardie
> 18=Poitou-Charentes
> 19=Provence-Alpes-Cote d'Azur
> 20=Rhone-Alpes
> 21=Corse
> 22=Outre Mer et Etranger
> ?"
> region=gets # I ask to enter a number between 10 to 22
>
> excel = WIN32OLE::new('excel.Application')
> excel.DisplayAlerts = false
> excel.Visible = 1
> workbook = excel.Workbooks.Open('C:\Ruby191\rv.xls')
>
> for i in 1 .. workbook.Worksheets.Count
>
>   worksheet = workbook.Worksheets(i)
>    rowcount = worksheet.UsedRange.Rows.Count
>   for j in 1..rowcount
>
> num =worksheet.Cells(j, 1).value
> nu=num.round(0)
>
> if nu=region
>
> puts worksheet.Cells(j, 2).value
>
> end
> end
> end
>
> with that script it array all worksheet.Cells(j, 2).value, I don't
> know how to array only worksheet.Cells(j, 2).value where nu=region
>
> Do you have an idea?
>
> thx

-- 
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] Re: Identify Flash Objects - to write

2011-02-24 Thread Dave McNulla
V,

Just do you know, this is not your automation technical support team. You 
will get more help if you ask questions in a polite way because everybody on 
this forum volunteers their time and answers. You will also get more help if 
you ask in the right group. There is a firebug group:
https://groups.google.com/forum/?lnk=srg&hl=en&ie=UTF-8#!forum/firebug

Good luck,

Dave

-- 
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: Can Watir support PHP based technology?

2011-02-24 Thread Željko Filipin
On Thu, Feb 24, 2011 at 1:49 PM, Ashu  wrote:
> Its working fine for me with HTML page

But there is a problem inspecting the page of your PHP app?

Ž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] Identify Flash Objects - to write

2011-02-24 Thread V
How do i identify flash objects as my firebug does not display
those.Any add-on for flash objects?

Say Ex: I opened app. A welcome screen came. Down the line there is "I
AGREE" button. But unable to view the source. How do i overcome this?

Assist 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.com


[wtr-general] Re: Can Watir support PHP based technology?

2011-02-24 Thread Ashu
Yes,
I have Firebud installed on Firefox
and I am using it for dealing with elements(HTML automation)
Its working fine for me with HTML page


On Feb 24, 5:47 pm, Željko Filipin 
wrote:
> On Thu, Feb 24, 2011 at 1:45 PM, Ashu  wrote:
> > It repeatedly gives the error Unable to locate the element
>
> Do you know how to use Firebug (or similar tool)?
>
> I will say this again: "An example would be handy right about now" Brian
> Marick would say.
>
> Ž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


Re: [wtr-general] Re: Can Watir support PHP based technology?

2011-02-24 Thread Željko Filipin
On Thu, Feb 24, 2011 at 1:45 PM, Ashu  wrote:
> It repeatedly gives the error Unable to locate the element

Do you know how to use Firebug (or similar tool)?

I will say this again: "An example would be handy right about now" Brian
Marick would say.

Ž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] Re: Can Watir support PHP based technology?

2011-02-24 Thread Ashu
I am dealing with automation of the PHP web page.
It repeatedly gives the error Unable to locate the element
as compared to if the page is saved (web page complete)
i.e.webpage.php.html.
There are various fieldsets on the webpage, so before these fieldsets
the class, id elements gets traced but beyond it none is being traced.
Please Help..


On Feb 24, 1:58 pm, Željko Filipin 
wrote:
> On Thu, Feb 24, 2011 at 7:56 AM, Ashu  wrote:
> > is there any way wherein a PHPs functionality be wrapped thereby
> > letting Watir to use the PHP page HTML elements?
>
> "An example would be handy right about now" Brian Marick would say.
>
> If you are asking if Watir can automate PHP web applications, answer is yes.
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them

-- 
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: Error on running script for first time

2011-02-24 Thread Jari Bakken
On Thu, Feb 24, 2011 at 9:47 AM, Ashu  wrote:

Looks like it's trying to install ffi 1.0.6:

>
> Gem files will remain installed in C:/Ruby186/lib/ruby/gems/1.8/gems/
> ffi-1.0.6 f
> or inspection.
> Results logged to C:/Ruby186/lib/ruby/gems/1.8/gems/ffi-1.0.6/ext/
> ffi_c/gem_make

..but childprocess depends on 0.6.X:

> ffi ~> 0.6.3
>

I have no idea what would cause this. AFAIK none of our dependencies
have a loose dependency that would cause 1.0.6 to get installed.

What version of Rubygems do you have?

-- 
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: Error on running script for first time

2011-02-24 Thread Tim Koopmans
186 ruby has an old version of rubygems. Try using 187 version of ruby or 
update rubygems manually. Instructions are at Watir.com under installation. 

Regards,
Tim 

Sent from my mobile ...


On 24/02/2011, at 7:47 PM, Ashu  wrote:

> On installing watir-webdriver gem...
> 
> C:\Ruby186\gems>gem install watir-webdriver
> ERROR:  http://rubygems.org/ does not appear to be a repository
> Building native extensions.  This could take a while...
> ERROR:  Error installing watir-webdriver:
>ERROR: Failed to build gem native extension.
> 
> C:/Ruby186/bin/ruby.exe extconf.rb
> checking for rb_thread_blocking_region()... no
> checking for ruby_thread_has_gvl_p()... no
> checking for ruby_native_thread_p()... no
> checking for rb_thread_call_with_gvl()... no
> creating extconf.h
> creating Makefile
> 
> make
> 'make' is not recognized as an internal or external command,
> operable program or batch file.
> 
> Gem files will remain installed in C:/Ruby186/lib/ruby/gems/1.8/gems/
> ffi-1.0.6 f
> or inspection.
> Results logged to C:/Ruby186/lib/ruby/gems/1.8/gems/ffi-1.0.6/ext/
> ffi_c/gem_make
> .out
> 
> As it required Runtime Dependencies ->
> gem install selenium-webdriver
> which again required rubyzip and
> rubyzip required childprocess thereby finally the Runtime Dependencies
> ffi ~> 0.6.3
> 
> So for every gem file installation the above error occurs.
> plz Help
> *I have downloaded all the above stated gems
> 
> 
> 
> On Feb 22, 2:20 pm, Željko Filipin 
> wrote:
>> On Tue, Feb 22, 2011 at 9:23 AM, Ashu  wrote:
>>> Despite installing jssh for Firefox, the following error occurs.
>> 
>> Try watir-webdriver gem, it drives Firefox (and other browsers) and you do
>> not have to install jssh:
>> 
>> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>> 
>> Željko
>> --
>> watir.com - community manager
>> watirpodcast.com - host
>> testingpodcast.com - audio podcasts on software testing. all of them
> 
> -- 
> 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] Problem in installing Flash Watir

2011-02-24 Thread Aditya
Thank you.

How do i identify flash objects as my firebug does not display those.Any
add-on for flash objects?


Say Ex: I opened app. A welcome screen came. Down the line there is "I
AGREE" button. But unable to view the source. How do i overcome this?




On Thu, Feb 24, 2011 at 3:06 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> 2011/2/24 Aditya 
>
> > Any specific process to install the specific gem.
>
> Download gem, open command prompt in folder where gem is downloaded, type:
>
> gem install gem_name
>
> (replace gem_name with the name of the gem, in this case flash_watir)
>
> Ž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
>

-- 
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] Re: Error on running script for first time

2011-02-24 Thread Ashu
On installing watir-webdriver gem...

C:\Ruby186\gems>gem install watir-webdriver
ERROR:  http://rubygems.org/ does not appear to be a repository
Building native extensions.  This could take a while...
ERROR:  Error installing watir-webdriver:
ERROR: Failed to build gem native extension.

C:/Ruby186/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... no
checking for ruby_thread_has_gvl_p()... no
checking for ruby_native_thread_p()... no
checking for rb_thread_call_with_gvl()... no
creating extconf.h
creating Makefile

make
'make' is not recognized as an internal or external command,
operable program or batch file.

Gem files will remain installed in C:/Ruby186/lib/ruby/gems/1.8/gems/
ffi-1.0.6 f
or inspection.
Results logged to C:/Ruby186/lib/ruby/gems/1.8/gems/ffi-1.0.6/ext/
ffi_c/gem_make
.out

As it required Runtime Dependencies ->
gem install selenium-webdriver
which again required rubyzip and
rubyzip required childprocess thereby finally the Runtime Dependencies
ffi ~> 0.6.3

So for every gem file installation the above error occurs.
plz Help
*I have downloaded all the above stated gems



On Feb 22, 2:20 pm, Željko Filipin 
wrote:
> On Tue, Feb 22, 2011 at 9:23 AM, Ashu  wrote:
> > Despite installing jssh for Firefox, the following error occurs.
>
> Try watir-webdriver gem, it drives Firefox (and other browsers) and you do
> not have to install jssh:
>
> http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them

-- 
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: Error on running script for first time

2011-02-24 Thread Željko Filipin
On Thu, Feb 24, 2011 at 9:47 AM, Ashu  wrote:
> On installing watir-webdriver gem...

Sorry, thought this was another thread. :)

> ERROR:  http://rubygems.org/ does not appear to be a repository

What do you get for `gem sources`?

I get this:

$ gem sources
*** CURRENT SOURCES ***

http://rubygems.org/
http://gems.github.com

To add rubygems.org:

gem sources -a http://rubygems.org/

>ERROR: Failed to build gem native extension.

Do you have DevKit installed?

http://rubyinstaller.org/addons.html

If that does not help, you should install Ruby from
http://rubyinstaller.org/

Ž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


Re: [wtr-general] Problem in installing Flash Watir

2011-02-24 Thread Željko Filipin
2011/2/24 Aditya 
> Any specific process to install the specific gem.

Download gem, open command prompt in folder where gem is downloaded, type:

gem install gem_name

(replace gem_name with the name of the gem, in this case flash_watir)

Ž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


Re: [wtr-general] Problem in installing Flash Watir

2011-02-24 Thread Aditya
Any specific process to install the specific gem.
How do i?


On Thu, Feb 24, 2011 at 2:24 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Thu, Feb 24, 2011 at 8:10 AM, V  wrote:
> > While installing Flash_watir gem i received following exceptions
>
> Flash Watir is not active since 2008.
>
> You can get the gem form here:
>
> http://code.google.com/p/flash-watir/downloads/list
>
> Željko
> --
> watir.com - community manager
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
>  --
> 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] Can Watir support PHP based technology?

2011-02-24 Thread Željko Filipin
On Thu, Feb 24, 2011 at 7:56 AM, Ashu  wrote:
> is there any way wherein a PHPs functionality be wrapped thereby
> letting Watir to use the PHP page HTML elements?

"An example would be handy right about now" Brian Marick would say.

If you are asking if Watir can automate PHP web applications, answer is yes.

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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] Problem in installing Flash Watir

2011-02-24 Thread Željko Filipin
On Thu, Feb 24, 2011 at 8:10 AM, V  wrote:
> While installing Flash_watir gem i received following exceptions

Flash Watir is not active since 2008.

You can get the gem form here:

http://code.google.com/p/flash-watir/downloads/list

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

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