[wtr-general] Re: can Watir run in remote webserver with linux OS??

2009-07-28 Thread Dylan

Don't see why not. Might be dangerous, depending on what sites you end
up crawling, but a recursive loop should do the trick. You'll have to
use something like FireWatir, unless you have IE on your linux web
server :)

-Dylan

On Jul 27, 8:32 pm, Joeyjoey dorik...@gmail.com wrote:
 hi there, i have a remote linux web server

 can i use Watir, for say crawling websites ?
--~--~-~--~~~---~--~~
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] Help on acessing values in a table

2009-07-28 Thread ajil

table class=program-drag-sec-box cellspacing=0 cellpadding=0
border=0 width=100%
tbody
tr class=con-white-bold height=30 align=left valign=middle
td class=link-line-bg style=width: 75px; padding-left: 10px;
/td
td class=link-line-bg style=width: 100px; padding-left: 10px;
/td
tr id=tooltip class=program-row height=30 align=left
valign=middle
td style=width: 75px;
/td
td class=con-grey align=left style=2 /td
td class=con-grey align=left style=On site Project Manager
/td 
td class=con-grey align=left style=Esha /td
td class=con-grey align=left style=Internal /td
td class=con-grey align=left style=Normal /td
td class=con-grey align=left style=e...@gmail.com /td
td class=con-grey align=left style=Active /td
td class=con-grey align=left style=
a id=edit class=con-grey style=width: 100px; href=/
ResetPassword/?ids=a1930f37-7846-11de-9983-0016764319d8Reset
Password/a
/td
td style=width: 75px;
/td
td class=con-grey align=left style=1 /td
td class=con-grey align=left style=Test Engineer /td

td class=con-grey align=left style=USER1/td
td class=con-grey align=left style=Internal /td
td class=con-grey align=left style=Manager /td
td class=con-grey align=left style=us...@gmail.com /td
td class=con-grey align=left style=Active /td
/tr
tr id=tooltip class=program-row height=30 align=left
valign=middle
/tbody
table

+++

I have an extract html code as mentioned above.I have to specifically
take the values On site Project Manager or Test Engineer inside
the td tags (mentioned with )  .Can Somebody help on this ?
--~--~-~--~~~---~--~~
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] Script to click the dynamically generated link.

2009-07-28 Thread Swap

Hello All,
I want to write the script to click the dynamiclly generated 'Edit'
and 'Delete' link. How can I do that?

This is the html code for that::

div class=contentHolder
table width=100% cellspacing=8 cellpadding=5 
border=0


tr bgcolor=#f6f2f6
td width=33%

span class=toolBara 
href=AppControl?pg=List
Usersret=Editid_user=4Edit/a|
a 
href='javascript:confirmDelete(AppControl?pg=List
Usersret=Deleteid_user=4)'Delete/a/span

span 
class=savedentityanbsp;-nbsp;associate/span/td

tr bgcolor=#f6f2f6
td width=33%

span class=toolBara 
href=AppControl?pg=List
Usersret=Editid_user=1Edit/a|
a 
href='javascript:confirmDelete(AppControl?pg=List
Usersret=Deleteid_user=1)'Delete/a/span

span 
class=savedentityadminnbsp;-nbsp;admin/span/td

tr bgcolor=#f6f2f6
td width=33%

span class=toolBara 
href=AppControl?pg=List
Usersret=Editid_user=3Edit/a|
a 
href='javascript:confirmDelete(AppControl?pg=List
Usersret=Deleteid_user=3)'Delete/a/span

span 
class=savedentitysappunbsp;-nbsp;associate/span/
td

tr bgcolor=#f6f2f6
td width=33%

span class=toolBara 
href=AppControl?pg=List
Usersret=Editid_user=2Edit/a|
a 
href='javascript:confirmDelete(AppControl?pg=List
Usersret=Deleteid_user=2)'Delete/a/span

span 
class=savedentityswapnbsp;-nbsp;associate/span/td

 /table

/div

Thanks in advance

Swapnal S.


--~--~-~--~~~---~--~~
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: Help on acessing values in a table

2009-07-28 Thread Chethan

Refer http://wtr.rubyforge.org/rdoc/ look for Watir:table 
watir:tables Class This will give you much about table related
functions.

Thanks,
Chethan

On Jul 28, 1:51 pm, ajil ajilmath...@gmail.com wrote:
 table class=program-drag-sec-box cellspacing=0 cellpadding=0
 border=0 width=100%
 tbody
 tr class=con-white-bold height=30 align=left valign=middle
 td class=link-line-bg style=width: 75px; padding-left: 10px;
 /td
 td class=link-line-bg style=width: 100px; padding-left: 10px;
 /td
 tr id=tooltip class=program-row height=30 align=left
 valign=middle
 td style=width: 75px;
 /td
 td class=con-grey align=left style=    2 /td
 td class=con-grey align=left style=    On site Project Manager
 /td 
 td class=con-grey align=left style=    Esha /td
 td class=con-grey align=left style=    Internal /td
 td class=con-grey align=left style=    Normal /td
 td class=con-grey align=left style=    e...@gmail.com /td
 td class=con-grey align=left style=    Active /td
 td class=con-grey align=left style=
 a id=edit class=con-grey style=width: 100px; href=/
 ResetPassword/?ids=a1930f37-7846-11de-9983-0016764319d8Reset
 Password/a
 /td
 td style=width: 75px;
 /td
 td class=con-grey align=left style=    1 /td
 td class=con-grey align=left style=    Test Engineer /td
 
 td class=con-grey align=left style=    USER1/td
 td class=con-grey align=left style=    Internal /td
 td class=con-grey align=left style=    Manager /td
 td class=con-grey align=left style=    us...@gmail.com /td
 td class=con-grey align=left style=    Active /td
 /tr
 tr id=tooltip class=program-row height=30 align=left
 valign=middle
 /tbody
 table

 +++

 I have an extract html code as mentioned above.I have to specifically
 take the values On site Project Manager or Test Engineer inside
 the td tags (mentioned with )  .Can Somebody help on this ?
--~--~-~--~~~---~--~~
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] atul-query

2009-07-28 Thread atul shukla
 Hi
I am trying to upload and save file from this watir script but its not
working. can i get some guidelines to make this workscript work.

# the Watir controller
require watir
ie = Watir::IE.new
 require 'win32ole'

ie.goto tinypic.com
ie.file_field(:id, the_file).set(C:\\image.png)
ie.link(:id, myLink).click_no_wait
save_file(C:\\file.txt)
def save_file(filepath)
ai = WIN32OLE.new(AutoItX3.Control)
ai.WinWait(File Download, , 5)
ai.ControlFocus(File Download, , Save)
sleep 1
ai.ControlClick(File Download, , Save, left)
ai.WinWait(Save As, , 5)
sleep 1
ai.ControlSend(Save As, , Edit1,filepath)
ai.ControlClick(Save As, , Save, left)
ai.WinWait(Download complete, , 5)
ai.ControlClick(Download complete, , Close)
  end

--~--~-~--~~~---~--~~
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: verify table cell text.

2009-07-28 Thread srik

Hi Zhimin,
Thanks a lot for giving good suggestions.
I am facing another problem with IE Explorer and FireFox, some scripts
working in IE  Some in FF.
when i am click on link Login
browser.link(:text, Log In).click(work in IE) but not in FF for the
same i have insert script double time

browser.link(:text, Log In).click
browser.link(:text, Log In).click (now it's working fine with FF)

the same issue i am facing in application with another link's
Please give me a solution for the same above mention, if any concern
please ask me.

Thanks
Srikanth.

On Jul 28, 3:26 am, Zhimin zhiminz...@gmail.com wrote:
 For Page (http://itest2.com/demo/survey) with html,

 table cellpadding=1 cellspacing=1 width=100%
   tr
     td/td
     td id=surveyId align=rightA101/td
   /tr
 /table

  1)how to get text form table cell .

  browser.cell(:id, surveyId).text

  2)how to verify the table cell text using  include? or match

  browser.cell(:id, surveyId).text.should == A101

  3) if there any material or user guide for the same.please send me.

  http://wiki.openqa.org/display/WTR/Methods+supported+by+Element

 Cheers,
 Zhimin
--~--~-~--~~~---~--~~
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: Attach failing with NoMethodError

2009-07-28 Thread Chuck van der Linden

The error would tend to indicate that whatever is trying to invoke
the .attach method is no longer pointing to an instance of a browser
object.   Although why that would be the case if the exact same code
executes fine on a different system is an interesting question.

You might want to check the 'protected mode' settings for the browser,
as that can cause IE to do things like spawn new browser sessions when
the security group on a called page is not the same as the current
page (and that includes the default page, or 'about:blank').  Server
2008 and Vista are very similar in that respect, but if the code was
designed and tested on a vista system where the 'protected mode' was
long ago turned off 'because it's a hassle' and the Server 2008 env is
fairly pristine (where the browser defaults to protectedmode being ON,
and highly discourages the user from disabling it) then it might
expain the behavior you are seeing.

On Jul 27, 11:14 am, Lori Bergan lori.ber...@eplanservices.com
wrote:
 I am setting up a new Watir env on a Win 2008 server box.  The tests I  
 have that use attach or attach_init are failing on the new box with  
 undefined method errors (the tests pass on my existing Vista env).  
 There must be an env issue with the new box.  Does anyone have any  
 suggestions on what I need to update, set or install to resolve this  
 issue?

 Thanks,
 Lori

    1) Error:
 test_generate_invoice_ach(TC_GenerateInvoice):
 NoMethodError: undefined method `attach' for #Watir::IE:0x4a47834
      C:/Projects/fast401k/trunk/src/watir/scripts/simple/
 admin/../../../lib/Utility/ie_tools.rb:
 25:in `url_navigator'
      C:/Projects/fast401k/trunk/src/watir/scripts/simple/admin/
 tc_generate_invoice.rb:132:in `te
 st_generate_invoice_ach'

 *** LOCAL GEMS ***

 activesupport (2.3.3)
 builder (2.1.2)
 commonwatir (1.6.2)
 firewatir (1.6.2)
 fxri (0.3.7)
 fxruby (1.6.19)
 hoe (2.3.2)
 hpricot (0.8.1)
 log4r (1.0.5)
 mkrf (0.2.3)
 ptools (1.1.6)
 rake (0.8.7)
 rubigen (1.5.2)
 ruby-oci8 (2.0.2)
 ruby-opengl (0.60.0)
 rubyforge (1.0.4)
 rubygems-update (1.3.5)
 s4t-utils (1.0.4)
 sources (0.0.1)
 test-unit (2.0.3)
 user-choices (1.1.6)
 watir (1.6.2)
 win32-api (1.4.3)
 win32-clipboard (0.5.2)
 win32-dir (0.3.4)
 win32-eventlog (0.5.0)
 win32-file (0.6.1)
 win32-file-stat (1.3.3)
 win32-process (0.6.1)
 win32-sapi (0.1.4)
 win32-service (0.7.0)
 win32-sound (0.4.1)
 windows-api (0.3.0)
 windows-pr (1.0.6)
 xml-simple (1.0.12)
--~--~-~--~~~---~--~~
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: atul-query

2009-07-28 Thread Chuck van der Linden

its not working doesn't give folks much to go on

what happens when you try to run the script?

On Jul 28, 4:12 am, atul shukla atul.shukl...@gmail.com wrote:
  Hi
     I am trying to upload and save file from this watir script but its not
 working. can i get some guidelines to make this workscript work.

 # the Watir controller
 require watir
 ie = Watir::IE.new
  require 'win32ole'

 ie.goto tinypic.com
 ie.file_field(:id, the_file).set(C:\\image.png)
 ie.link(:id, myLink).click_no_wait
 save_file(C:\\file.txt)
 def save_file(filepath)
     ai = WIN32OLE.new(AutoItX3.Control)
     ai.WinWait(File Download, , 5)
     ai.ControlFocus(File Download, , Save)
     sleep 1
     ai.ControlClick(File Download, , Save, left)
     ai.WinWait(Save As, , 5)
     sleep 1
     ai.ControlSend(Save As, , Edit1,filepath)
     ai.ControlClick(Save As, , Save, left)
     ai.WinWait(Download complete, , 5)
     ai.ControlClick(Download complete, , Close)
   end
--~--~-~--~~~---~--~~
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: Script to click the dynamically generated link.

2009-07-28 Thread Chuck van der Linden

When interacting with the page manually, how do you know which link
you want to click?  is it always in the same position (e.g. always the
third 'edit' link) or next to a particular label in the table, or
something else?

without knowing how you determind which is the correct link to click,
we can't tell you how you would create a script to do the same
thing.

Also what part of the code is 'dynamically generated' and subject to
change?  do the URL values vary?  the position on the page?  without
knowing what is dynamic vs what is constant, we can't know what
potential means to identify elements are 'out of play'  (or vastly
more complicated) as it were.

On Jul 28, 2:04 am, Swap swapnal.sa...@gmail.com wrote:
 Hello All,
 I want to write the script to click the dynamiclly generated 'Edit'
 and 'Delete' link. How can I do that?

 This is the html code for that::

 div class=contentHolder
                         table width=100% cellspacing=8 cellpadding=5 
 border=0

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=4Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=4)'Delete/a/span

                                                 span 
 class=savedentityanbsp;-nbsp;associate/span/td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=1Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=1)'Delete/a/span

                                                 span 
 class=savedentityadminnbsp;-nbsp;admin/span/td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=3Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=3)'Delete/a/span

                                                 span 
 class=savedentitysappunbsp;-nbsp;associate/span/
 td

                                                 tr bgcolor=#f6f2f6
                                                 td width=33%

                                                 span class=toolBara 
 href=AppControl?pg=List
 Usersret=Editid_user=2Edit/a|
                                                 a 
 href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=2)'Delete/a/span

                                                 span 
 class=savedentityswapnbsp;-nbsp;associate/span/td

              /table

                         /div

 Thanks in advance

 Swapnal S.
--~--~-~--~~~---~--~~
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: Getting style attribute of HTML element

2009-07-28 Thread Chuck van der Linden

For some of the more 'standard' style attributes I've also been able
to get at them similar to this

puts ie.div(:id, 'search').style.visibility


Aaron, if the style is not specified in the basic HTML for the page,
then it's likely coming from a resource such as a .CSS file, or could
be set/altered by javascript executing on the client side.

On Jul 27, 7:48 am, Charley Baker charley.ba...@gmail.com wrote:
 You should be able to access it like this:

 ie.div(:id, 'search').document.currentStyle.invoke('display')

 Charley Baker
 blog:http://blog.charleybaker.org/
 Lead Developer, Watir,http://wtr.rubyforge.org
 QA Architect, Gap Inc Direct

 On Mon, Jul 27, 2009 at 8:44 AM, Aaron MacDonald aa...@genieknows.comwrote:





  I have an element with a style attribute I need to access, like this:

  div id=search class=absolute hide style=display: block;
  ...
  /div

  Note that I am only able to see the style attribute using Firebug; it
  doesn't show up when I view the page source.  Is it possible though to
  examine the style attribute through Watir?- 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: Testing Link on list of pages

2009-07-28 Thread Chuck van der Linden

Small critique to the test you are doing.

What's the inner if' statement supposed to be doing for you?  why
return the browser to the page you are testing after the first link
you check, but not after any others?

From the looks of your code, your intent is to 'spider' each link on
the pages you are testing, or is there something more I've missed?

Have you asked yourself 'what am I really trying to test' and 'how do
I know if things are working correctly'?

If I am reading it correctly, all you are doing in the test code you
supplied is making sure each link on the page loads.  But how do you
know that the links on the page point where they are supposed to?, how
do you know if the link text/graphic is correct relative to where the
link goes, or the link is even visable to the user? or located within
the right area of the page?  Or that the correct links are actually
present on the page? that there are not links present on the page that
should not be there?   Furthermore, if a link fails how do you know if
the problem is due to the link URL being incorrect, or that the server
at the site it points to was not responding?

Do you realise that:
 * all your pages could be devoid of links and the test will pass
 * all your pages could have links that do nothing but reference the
page itself, and the test will still pass.
 * some hacker could have defaced the page and added extra links
pointing to some spam site, or altered all the links to point to pr0n
sites, or sites with malevelent code, inserted cross-site scripting
attacks etc, and your test would still PASS and say 'the links are all
good'.

Other than 'spidering' the page and trying all the links, what value
does this automation really provide to your business?  Could a false
sense of security caused by thinking 'we checked all the links'
actually create a risk to your business?

On Jul 27, 4:24 am, Satya satyajit.prad...@gmail.com wrote:
 I am writing a script to check links on a specific page. I am getting
 the list of pages(URL’s) from an excel file. The issue that I am
 facing is once the loop starts and an exception is encountered the
 execution stops, so I have put a ‘retry’ in the exception section. But
 the issue is it again starts the whole loop execution.
 Eg. In the excel file I have stored 5 URL’s to test and exception is
 encountered at 3 URL then the loop starts from the 1 URL again.

 I want it to start from 4th URL of the excel file (not from 3rd since
 I know there is some issue as the expectation was raised)

 =
 The script that I have written:

 xlFile = XLS.new(C:/LinkChecker/Data/BusinessUnits.xls)
 CreateBU = xlFile.getRowRecords('create_bu','create_bu')

 $ie = IE.new

 $ie.goto(url to my application)

 Login($username,$pwd)

       begin
           CreateBU.each do |record|
                   i =0

                 $ie.goto(record['BUName'])

                 links = Array.new
                 $ie.links.each do |link|

                             $ie.goto(link.href)

                             if(i  0)
                               $ie.goto(record['BUName'])
                               puts i
                             end
                             i = i + 1

                         end
                       sleep(5)
                     end

           end

       rescue Exception = msg
                 puts(The exception is  + msg)
                 retry
       ensure
                 close_resultFile($result)
                 xlFile.close

       end
--~--~-~--~~~---~--~~
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] Open source tool for window apps

2009-07-28 Thread venky

Hi,

Is there any open source tool to automate window based application?

Thanks,
Venkat
http://prog2impress.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] Re: Open source tool for window apps

2009-07-28 Thread Dylan

http://www.autoitscript.com/autoit3/

-Dylan

On Jul 28, 11:34 am, venky venkatesh...@gmail.com wrote:
 Hi,

 Is there any open source tool to automate window based application?

 Thanks,
 Venkathttp://prog2impress.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] Re: can Watir run in remote webserver with linux OS??

2009-07-28 Thread Joeyjoey

now does Xvfb have to be running ?

On Jul 27, 11:41 pm, Dylan mej...@gmail.com wrote:
 Don't see why not. Might be dangerous, depending on what sites you end
 up crawling, but a recursive loop should do the trick. You'll have to
 use something like FireWatir, unless you have IE on your linux web
 server :)

 -Dylan

 On Jul 27, 8:32 pm, Joeyjoey dorik...@gmail.com wrote:

  hi there, i have a remote linux web server

  can i use Watir, for say crawling websites ?

--~--~-~--~~~---~--~~
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] SafariWatir will not access the default value of a selectlist

2009-07-28 Thread Jeff Lusenhop

I am attempting to migrate working cucumber tests in Watir (IE) and
have them work on the Mac driving Safari.  I cannot determine how to
have Safari verify the default value of a selectlist.

This is the command I am using:

@browser.select_list(:id, 'id_name').selected_value.should == --
Select--

This is the error message I receive:

expected: --Select--,
   got:  (using ==)

   Diff:
  @@ -1,2 +1 @@
  ---Select--
   (Spec::Expectations::ExpectationNotMetError)

The default value of the selectlist is '--Select--'

Any help would be greatly appreciated.

--~--~-~--~~~---~--~~
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: Script to click the dynamically generated link.

2009-07-28 Thread Swapnal
Hi,

In this application when we add user every user will have the 'Edit' and
'Delete' link.

span class=savedentityanbsp;-nbsp;associate/span/td

 tr bgcolor=#f6f2f6
 td width=33%

 span class=toolBara
href=AppControl?pg=List
 Usersret=Editid_user=1Edit/a|
 a
href='javascript:confirmDelete(AppControl?pg=List
 Usersret=Deleteid_user=1)'Delete/a/span

I want to write the code to click the 'Edit' link from above code.

How can I write it?


On Tue, Jul 28, 2009 at 9:54 PM, Chuck van der Linden sqa...@gmail.comwrote:


 When interacting with the page manually, how do you know which link
 you want to click?  is it always in the same position (e.g. always the
 third 'edit' link) or next to a particular label in the table, or
 something else?

 without knowing how you determind which is the correct link to click,
 we can't tell you how you would create a script to do the same
 thing.

 Also what part of the code is 'dynamically generated' and subject to
 change?  do the URL values vary?  the position on the page?  without
 knowing what is dynamic vs what is constant, we can't know what
 potential means to identify elements are 'out of play'  (or vastly
 more complicated) as it were.

 On Jul 28, 2:04 am, Swap swapnal.sa...@gmail.com wrote:
  Hello All,
  I want to write the script to click the dynamiclly generated 'Edit'
  and 'Delete' link. How can I do that?
 
  This is the html code for that::
 
  div class=contentHolder
  table width=100% cellspacing=8
 cellpadding=5 border=0
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=4Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=4)'Delete/a/span
 
  span
 class=savedentityanbsp;-nbsp;associate/span/td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=1Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=1)'Delete/a/span
 
  span
 class=savedentityadminnbsp;-nbsp;admin/span/td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=3Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=3)'Delete/a/span
 
  span
 class=savedentitysappunbsp;-nbsp;associate/span/
  td
 
  tr bgcolor=#f6f2f6
  td width=33%
 
  span class=toolBara
 href=AppControl?pg=List
  Usersret=Editid_user=2Edit/a|
  a
 href='javascript:confirmDelete(AppControl?pg=List
  Usersret=Deleteid_user=2)'Delete/a/span
 
  span
 class=savedentityswapnbsp;-nbsp;associate/span/td
 
   /table
 
  /div
 
  Thanks in advance
 
  Swapnal S.
 


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