Re: [Wtr-general] [firewatir] Fire_event not working in Firefox

2007-06-10 Thread Prema Arya

Hi Jhun,

One more thing I noticed in your code you have mis-spelled the fire-event
its fireEvent.
li.fireEventt(ondblclick); should work.

Let me know if it solves the problem.

Regards,
Prema


On 6/7/07, Prema Arya [EMAIL PROTECTED] wrote:


I have taken this gem from the trunk.
You can install it and start using. Hope this is what you are expecting.

Regards,
Prema

On 6/7/07, jhun [EMAIL PROTECTED] wrote:

 i hope u could help me. Im in a rush. Thanks!!!
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general




--
Prema Arya





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [firewatir] Fire_event not working in Firefox

2007-06-07 Thread Prema Arya

Hi Jhun,

Thanks for reporting this. You can use the latest code form svn/trunk at
http://firewatir.googlecode.com/svn/trunk/FireWatir/
We have already fixed this issue.
In case you face any problem let me know.

Regards,
Prema


On 6/7/07, jhun [EMAIL PROTECTED] wrote:


I have this in my code:

lis =
$browser.elements_by_xpath(//li);
lis.each do |li|
$logger.log(value:  +
li.id);
if (li.id == d.id[4..10])
$logger.log(FOUND!!!);

*   li.fire_event
(ondblclick);*
break;
end
end

In bold text, doesnt seem to work. Can you please help me or i hope
there's alternative to activate the ondblclick event. Thanks for the help!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Read a picture number

2007-06-04 Thread Prema Arya

Hi,

You want to read the number from an image or text in the html code? give us
a clear picture.

Regards,
Perma


On 6/4/07, chitta [EMAIL PROTECTED] wrote:


 Hi,,


Is this possible to read a picture number from a page and write it in the
text field.



Regards

Chitta Ranjan

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] FireWatir doesn't ignore if it doesn't exists but

2007-05-23 Thread Prema Arya

Hi Eoin,
Are you still facing the problem? try using the latest code from svn.
if it's still there ,II will look into it.

Regards,
Prema




On 5/11/07, Bret Pettichord [EMAIL PROTECTED]  wrote:


I was confused about your problem. It now looks like this is a FireWatir
bug.

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to click variable link

2007-05-23 Thread Prema Arya

can you send the code snippet?

On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote:


hi,
Thanks!!

im getting this problem with HREF

1) Error:
test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
Watir::Exception::UnknownObjectException: Unable to locate object, using
HREF and
http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3

i also tried with href(lower case).
but the error was same.

im sending the HTML..
HTML :-
TD CLASS=RowLevel1 
A BORDER=0 CLASS=Image
ONCLICK=javascript:toggleRows('m523');toggleImageSource('img2','themes/default/images/open-
menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2
SRC='themes/default/images/closed-menu.gif' ALT=
ALIGN=absmiddle//A A HREF= 
http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3
 onmouseover=javascript:ShowTooltip('Access detailed quality and
quantity assessment page for the selected component.');
onmouseout=javascript:HideTooltip(); 
  sys_asp
 /A
 nbsp;
/TD
TD CLASS=Hide 

'sys_asp' is variable link...it is user defined..

please help its very urgent
Regards
Shalini Gupta
 On 5/22/07, Željko Filipin [EMAIL PROTECTED] wrote:

 On 5/22/07, SHALINI GUPTA [EMAIL PROTECTED]  wrote:
 
  I tried to this with href but its not working.


 Hi Shalini,

 What error message do you get when you use href? Can you post your Watir
 and Ruby code?

 There is lot of ways you can click a link. I recommend id.

 Jeff has made page at Watir wiki about it. See 
http://wiki.openqa.org/display/WTR/Methods+supported+by+Element


 Zeljko
 --
 ZeljkoFilipin.com
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to click variable link

2007-05-23 Thread Prema Arya

in the html code you have given no link is having
http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3
in the href   every link's  href start with localhost:8080

are you sure you are using the same HTML?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to click variable link

2007-05-23 Thread Prema Arya

Shalini,

The code your have written works fine here at my end using the html you have
sent  .. provided the link having text
,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS is there in
the page. However, when I change the text so someting that is not there in
the page it is throwing same error as you are getting.

It seems to me, you are looking for a link on a screen where its not present
or there is some spelling mistake in the text you are searching.

Regards,
Prema.


On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote:


my watir code is:-

def system_link
  $logger.log(## CAST_HOMEPAGE_05)
  $logger.log()
  $logger.log ## System link
#\n
  $logger.log(Description-In Health Factor with lowest grade / System
subsection, click System link ) #logs only to corelogger file
  $logger.log(Expected Output-Outline page displaying Focus on System
systemX - part of CORPORATE - for snapshotX snapshot should be displayed )
  $logger.log()
  
#$ie.link(:href,'http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click


$ie.link(:href,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click
  end
error is
1) Error:
test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
Watir::Exception::UnknownObject

 Exception: Unable to locate object, using href and
 (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS)


regards
shalini gupta



On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED]  wrote:

 hi,

 after using regular expression im getting this error
 1) Error:
 test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
 Watir::Exception::UnknownObjectException: Unable to locate object, using
 href and
 (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS)


 On 5/23/07, Prema Arya  [EMAIL PROTECTED] wrote:
 
   in the html code you have given no link is having 
http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3
  in the href   every link's  href start with localhost:8080
 
  are you sure you are using the same HTML?
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to click variable link

2007-05-23 Thread Prema Arya

One more thing '' has different meaning in regular expression, so try
escaping it out like

$ie.link(:href,/treeobject=3305\object=3305\frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click
This could be the mistake...

Regards,
Prema



On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote:


Shalini,

The code your have written works fine here at my end using the html you
have sent  .. provided the link having text
,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS is there in
the page. However, when I change the text so someting that is not there in
the page it is throwing same error as you are getting.

It seems to me, you are looking for a link on a screen where its not
present or there is some spelling mistake in the text you are searching.

Regards,
Prema.


 On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote:

 my watir code is:-

 def system_link
   $logger.log(## CAST_HOMEPAGE_05)
   $logger.log()
   $logger.log ## System link
 #\n
   $logger.log(Description-In Health Factor with lowest grade /
 System subsection, click System link ) #logs only to corelogger file
   $logger.log(Expected Output-Outline page displaying Focus on
 System systemX - part of CORPORATE - for snapshotX snapshot should be
 displayed )
   $logger.log()
   #$ie.link(:href,' 
http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click


 
$ie.link(:href,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click
   end
 error is
 1) Error:
 test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
 Watir::Exception::UnknownObject
 
  Exception: Unable to locate object, using href and
  (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS)


 regards
 shalini gupta



 On 5/23/07, SHALINI GUPTA  [EMAIL PROTECTED]  wrote:
 
  hi,
 
  after using regular expression im getting this error
  1) Error:
  test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage):
  Watir::Exception::UnknownObjectException: Unable to locate object,
  using href and
  (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS)
 
 
  On 5/23/07, Prema Arya  [EMAIL PROTECTED]  wrote:
  
in the html code you have given no link is having 
http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3
   in the href   every link's  href start with localhost:8080
  
   are you sure you are using the same HTML?
  
   ___
   Wtr-general mailing list
   Wtr-general@rubyforge.org
   http://rubyforge.org/mailman/listinfo/wtr-general
  
 
 

 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general




--
Prema Arya





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Prema Arya
?
   assert_block(build_message(message,
   ? not found in JavaScript dialog.,
   pattern)) do
   window_text.match(pattern)
   end
   else
   raise Test::Unit:: AssertionFailedError.new(
   build_message(message, No JavaScript window
   found.))
   end
   ensure
   pipe.close if pipe  !pipe.closed?
   end
   end
   end
   end
  
   # test - will close and print the text of an opened javascript
   dialog if
   # run as ruby js_dialog.rb
   if $0 == __FILE__
   action = ARGV.shift || close
   print JavascriptDialog.text || 
   JavascriptDialog.send action
   end
  
   if possible then please help me...and give me some code...
  
   Regards
   Shalini Gupta
  
  
   On 4/24/07, Paul Rogers  [EMAIL PROTECTED] wrote:
   
there is stuff in the winclicker to do it too. We've got the
javascript pop up text back to the main app by saving it to a file
   
   
Paul
   
Hi,
   
As far as I know, clicking some button on Pop up window happens in
a different process (different from current process in which your 
script is
running). Correct me if I am wrong here?
   
You can get the text using AutoIt3 and WinGetText method. The only
thing you need to find out is how you communicate data or the text 
between
two different processes.
   
Regards,
Angrez
   
On 4/24/07, SHALINI GUPTA  [EMAIL PROTECTED] wrote:

 HI List,

 Please help regarding popup.
 How to get the text of a popup window..
 its very urgent please help.

 Regards
 Shalini gupta

 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

   
   
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
   
  
  
   ___
   Wtr-general mailing list
   Wtr-general@rubyforge.org
   http://rubyforge.org/mailman/listinfo/wtr-general
  
 
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Prema Arya
?
   assert_block(build_message(message,
   ? not found in JavaScript dialog.,
   pattern)) do
   window_text.match(pattern)
   end
   else
   raise Test::Unit:: AssertionFailedError.new(
   build_message(message, No JavaScript window
   found.))
   end
   ensure
   pipe.close if pipe  !pipe.closed?
   end
   end
   end
   end
  
   # test - will close and print the text of an opened javascript
   dialog if
   # run as ruby js_dialog.rb
   if $0 == __FILE__
   action = ARGV.shift || close
   print JavascriptDialog.text || 
   JavascriptDialog.send action
   end
  
   if possible then please help me...and give me some code...
  
   Regards
   Shalini Gupta
  
  
   On 4/24/07, Paul Rogers  [EMAIL PROTECTED]  wrote:
   
there is stuff in the winclicker to do it too. We've got the
javascript pop up text back to the main app by saving it to a file
   
   
Paul
   
Hi,
   
As far as I know, clicking some button on Pop up window happens in
a different process (different from current process in which your 
script is
running). Correct me if I am wrong here?
   
You can get the text using AutoIt3 and WinGetText method. The only
thing you need to find out is how you communicate data or the text 
between
two different processes.
   
Regards,
Angrez
   
On 4/24/07, SHALINI GUPTA  [EMAIL PROTECTED]  wrote:

 HI List,

 Please help regarding popup.
 How to get the text of a popup window..
 its very urgent please help.

 Regards
 Shalini gupta

 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

   
   
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
   
  
  
   ___
   Wtr-general mailing list
   Wtr-general@rubyforge.org
   http://rubyforge.org/mailman/listinfo/wtr-general
  
 
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] FireWatir 1.0.2 released

2007-04-17 Thread Prema Arya

Hi,



We have released FireWatir Version 1.0.2. This version is platform
independent. Though not tested on Linux and Mac by FireWatir team due to
lack of resources/time, its been used by people on different platforms.

In this version we concentrated more on filling gaps between scripts written
for Watir and FireWatir, your continuous feedback helped us a lot.

Along with the bug fixes, this version includes:

  1. to_s for all the elements which returns element specific attributes
  along with attributes that apply to all the elements.
  2. Iterators for all the elements.
  3. show_all_objects.
  4. Support to wait for Firefox to load the page in case there is
  redirect on the page that is currently loading.
  5. Code documentation.


  - You can download the new gem *firewater-1.0.2.gem * and xpi (for
  Linux also courtesy *Viktor Zigo*) from :
  http://code.google.com/p/firewatir/downloads/list
  - You can download the code from svn branch
  http://firewatir.googlecode.com/svn/trunk/
  - The release notes lists all the new features in detail at
http://code.google.com/p/firewatir/wiki/ReleaseNotes

  - The installation guide document :
  http://code.google.com/p/firewatir/downloads/list
  - The installation guide for different OS :
  http://code.google.com/p/firewatir/wiki/FireWatir_Installation
  - If you find any issue using it, please mail to Firewatir google
  group ([EMAIL PROTECTED]) or log an issue to the issue
  tracker at 
http://code.google.com/p/firewatir/issues/listhttp://code.google.com/p/firewatir/issues/list
   .

Hope you will have good experience  using the new version of FireWatir!



Regards,

FireWatir Team.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] problem with text_field.set

2007-03-23 Thread Prema Arya

Hi Jhun,



The problem is not very clear to me, I was trying to figure out..You click
on a link and then the text box with grp_name_txtbox id gets displyed(ajax).
If you are not able to set the value of that text box ..may be you are not
waiting for it to load.



You can check on a loop if the text box has appeared and then try setting
it.



while( !$ie.text_field(:id, /grp_name_txtbox/i).exists?)

sleep(2)

end



Or provide us with more information when exactly you face problem what is
the functionality you are testing.



Regards,

Prema


On 3/23/07, jhun [EMAIL PROTECTED] wrote:


Please.. i need your help badly. Thanks in advance!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to output brief/detail information when do logging

2007-03-16 Thread Prema Arya

Hi Jason,

You can look into Log4r library.
http://log4r.sourceforge.net/

Regards,
Prema


On 3/16/07, Jason He [EMAIL PROTECTED] wrote:


 Dear all,



I use C:\watir1145\examples\logging\example_logger1.rb to do logging, it
will output the same message both into the console and log file.

Now, I want it output brief message on the console while detail message in
the log file, in other words, the run result for each test case on the
console and trace/debug information for every step in the log file, is there
an switch parameter in it can achieve it?



Or is there any ruby class/script/project which can conveniently solve
this problem?



Regards,

Jason



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Send email from Watir script

2007-02-09 Thread Prema Arya

Hi,

You don't need a free smtp server if you are having one in your network,
it's the same as you are using for your email client like Outlook. If you
are sending mail to same network you don't need to login in your mail
server, you can directly send mail to anyone using the same mail server

Net::SMTP.start('smtp_server_name', 25) do |smtp|

For sending mails to other mail address then you need to login to the mail
server and then send the mails

This code works in my case:
Net::SMTP.start('smtp_server_name',
25,example.com,username,password,:login)
do |smtp|
smtp.open_message_stream([EMAIL PROTECTED]', ['[EMAIL PROTECTED]) do |f|
f.puts 'From: [EMAIL PROTECTED]'
f.puts 'To: [EMAIL PROTECTED]'
f.puts 'Subject: test message'
f.puts
f.puts 'This is a test message.'
end
end

you can refer this documentation for more details
http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html

Regards,
Prema


On 2/9/07, Walter Kruse [EMAIL PROTECTED] wrote:


You'll need an SMTP server, try Free SMTP server from
http://www.softstack.com/freesmtp.html

require 'net/smtp'

myMessage = END_OF_MESSAGE
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: My mail
Message body here
END_OF_MESSAGE

Net::SMTP.start('localhost') do |smtp|
smtp.send_message myMessage, '[EMAIL PROTECTED]',
'[EMAIL PROTECTED]'
end


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Sent: 09 February 2007 01:48 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Send email from Watir script

Hi,

Is it possible to send an email with test results from Watir script?

Thank you
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6493messageID=18447#18447
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

**
Everything in this e-mail and attachments relating to the official
business of MultiChoice Africa is proprietary to
the company. Any view or opinion expressed in this message may be the view
of the individual and should not automatically
be ascribed to the company.  If you are not the intended recipient, you
may not peruse, use, disseminate, distribute or
copy this message. If you have received this message in error, please
notify the sender immediately by email, facsimile
or telephone and destroy the original message.

**
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] custom attributes

2007-02-05 Thread Prema Arya

Hi Bret,

Following are the features that are there in FireWatir but not in Watir.
Some of these can be impelemented easily but some of them really need a
thought:

  1. Accessing element using any attribute that is there in the rendered
  HTML on the browser.
  2.  There is method_missing function in FireWatir which catches the
  methods that are called for an element but are not implemented. This method
  will then call those methods on the element and will return the results
  appropriately. This can be useful in case user accesses an element using
  XPATH whose class is not there like MAP (which is there in Watir, but not in
  Firewatir) and user tries to fire or execute the method that is defined for
  the element but not implemented.
  3. Platform Indpendence: This functionality FireWatir inherits from
  its implementation i.e. usage of JSSh.
  4. Running on Remote machine: This functionality FireWatir also
  inherits from its implementation i.e. usage of JSSh.

  That is what I can think of as of now.

  Regards,



Regards

Prema

On 1/31/07, Bret Pettichord [EMAIL PROTECTED]  wrote:


Prema Arya wrote:
 Yes we can do it in FireWatir also:

 puts ff.text_field(:custom, custom).value
 input id=id value=Prema custom=custom

We do not support this in Watir::IE. Should we? Are there other features
that were added to FireWatir that aren't in Watir::IE?

As we think about recombining all the different versions of Watir, we
will have to support a common API across the versions, so we will need
to have a way of reaching agreement on these kinds of issues.

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Watir with Ajax

2007-02-01 Thread Prema Arya

You can wait in a loop till the select box is loaded or use some kind of
indicators like in gamil the top right corner of window reads
Loading... when the mails are being loaded.



In your case you can wait for the control itself



#while the control exists is false sleep

while(!ie.select_list( :name , criteria[1][type_id]).exists?)

sleep(2)

end



#the select box is loaded now

go ahead with other operations.



If some text is displayed on the page as result of ajax call, you can also
check for that



while(!isMessageDisplayed(text displayed on page))

end

#The Ajax control is loaded

end



Hope this helps.



Prema



On 2/2/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:


I can't send a link to my application as it is in my local host. I am
sorry for this.

The select  option will be generating after i click on the link. Its
ajax stuff. So that select can't be shown in the html. It is generating
after the whole page is loaded. So wat should be done for such type of
application??
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6378messageID=18056#18056
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] url for link

2007-02-01 Thread Prema Arya

Hi,

You can't use regular expression in xpath with XPATH 1.0, you can use it in
XPATH 2.0 and rexml supports only xpath 1.0.

You can use string operations like substring, string before, string after
though.
http://www.w3.org/TR/xpath#section-String-Functions.


Prema

On 2/2/07, Željko Filipin [EMAIL PROTECTED] wrote:


On 1/30/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:

 a href=# onclick=new 
Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227',
 {asynchronous:true, evalScripts:true}); return false;add a term/a


Can regular expressions be used with xpath? This does not work.

ie.link(:xpath, //[EMAIL PROTECTED]'#{/227/}']/).click
Watir::Exception::UnknownObjectException: Unable to locate object, using
xpath and //[EMAIL PROTECTED]'(?-mix:227)']/
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] custom attributes

2007-01-30 Thread Prema Arya

I thought I should elaborate the two ways, you can access an element using

the custom attribute directly like this: puts ff.text_field(:custom,
custom) and

Using xpath in Firefox.



And to access a custom attribute value is same as it is in Watir.

puts ff.text_field(:id, id).attribute_value(custom)



For the above two puts output will be

Prema

custom



PS: missed the last output line in the previous mail.


Prema
On 1/30/07, Prema Arya [EMAIL PROTECTED] wrote:


 Yes we can do it in FireWatir also, there are two ways you can do:

require 'firewatir'
include FireWatir

ff = Firefox.new(5)

ff.goto(file:///F:/extras/firewatir/custom.html)
puts ff.text_field(:custom, custom).value
puts ff.text_field(:id, id).attribute_value(custom)
ff.close
html code
--
html
body
form
input id=id value=Prema custom=custom
/form
/body
/html
ouput is:

Prema

On 1/29/07, Paul Rogers [EMAIL PROTECTED]  wrote:

  I really only p[osted this for information to others who want to search
 the archives. If its something that occurs a lot, it may be possible to add
 it to watir directly, but Ive never seen these things used.

 And does firefox support them? Allow you to access them?


 Paul


 On 1/29/07, Prema Arya  [EMAIL PROTECTED]  wrote:
 
  ie.text_field(:xpath , //[EMAIL PROTECTED]'paul']/)
 
 

 This is so cool.
 --
 Zeljko Filipin
 zeljkofilipin.com
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general




--
Prema Arya





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] custom attributes

2007-01-29 Thread Prema Arya

Hi Paul,

You can use xpath to address the elements having custom attributes.

For example, to access the following input tag

input type=text name=aa mytag=paul

using xpath the code would look like this:

inText = ie.text_field(:xpath , //[EMAIL PROTECTED]'paul']/)
puts inText

Regards,
Prema

On 1/29/07, Paul Rogers [EMAIL PROTECTED] wrote:




Some one asked me off list if they could access the mytag part of some
html like the following

input type = text name = aa mytag=paul

With the 1.5.1-1145 gem you can do this:

puts ie.text_field(:index,1).ole_object.mytag
returns 'paul'


this doesnt seem to work though:

ie.text_field(:mytag ,/p/).flash
causes a MissingWayOfFindingObjectException

Hope that helps others too.

Paul



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] BUG: Using XPath

2007-01-29 Thread Prema Arya

Hi,

Please find the attached patch fixing the xpath issue.

Regards,
Prema


On 1/25/07, Bret Pettichord [EMAIL PROTECTED] wrote:


On 1/25/07, Prema Arya [EMAIL PROTECTED] wrote:

  This change should be checked-in in the main branch also, Bret can you
 give me access right to check-in? or someone else also can check-in the
 change.


Please submit a patch.








--
Prema Arya


xpath_bug-fix.patch
Description: Binary data
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] how to make Watir output the current system datethrough a command

2007-01-29 Thread Prema Arya

You can refer this for more date-time formats:
http://www.rubycentral.com/book/ref_c_time.html#Time.strftime


Prema



On 1/29/07, Walter Kruse [EMAIL PROTECTED] wrote:


Hi Vijay
This is a Ruby method, not specific to Watir:

Time.now.strftime(%d-%b-%Y)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of vijay
Sent: 29 January 2007 01:51 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] how to make Watir output the current system
datethrough a command

Hello people,

I do not know what command to use to make Watir output the current
system date and to convert it into the desired format, dd-mon-
(22-Jan-2007).  I want the current system date inorder to check whether
a particular field present in the application has the currrent date or
not.  If anybody could help me, I would be thankful.

Thanks, in Advance
Vijay
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6308messageID=17750#17750
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

**
Everything in this e-mail and attachments relating to the official
business of MultiChoice Africa is proprietary to
the company. Any view or opinion expressed in this message may be the view
of the individual and should not automatically
be ascribed to the company.  If you are not the intended recipient, you
may not peruse, use, disseminate, distribute or
copy this message. If you have received this message in error, please
notify the sender immediately by email, facsimile
or telephone and destroy the original message.

**
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] How to click an image button

2007-01-29 Thread Prema Arya

Hi,

This code will click the image with name like Login_button.jpg

ie.image(:src, /Login_button.jpg/).click

Prema





On 1/29/07, ankur [EMAIL PROTECTED] wrote:


Hi all

I am automating test cases for a web application . Can someone please tell
me how to click on a button which has its value as a image .The code in Html
says

img src=images/af/Login_button.jpg

looking for an early response..
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6309messageID=17751#17751
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] custom attributes

2007-01-29 Thread Prema Arya

Yes we can do it in FireWatir also, there are two ways you can do:

require 'firewatir'
include FireWatir

ff = Firefox.new(5)

ff.goto(file:///F:/extras/firewatir/custom.html)
puts ff.text_field(:custom, custom).value
puts ff.text_field(:id, id).attribute_value(custom)
ff.close
html code
--
html
body
form
input id=id value=Prema custom=custom
/form
/body
/html
ouput is:

Prema

On 1/29/07, Paul Rogers [EMAIL PROTECTED] wrote:


I really only p[osted this for information to others who want to search
the archives. If its something that occurs a lot, it may be possible to add
it to watir directly, but Ive never seen these things used.

And does firefox support them? Allow you to access them?


Paul


On 1/29/07, Prema Arya [EMAIL PROTECTED] wrote:

 ie.text_field(:xpath , //[EMAIL PROTECTED]'paul']/)



This is so cool.
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general





--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] BUG: Using XPath

2007-01-25 Thread Prema Arya

Hi,



I was trying to get the th from table as asked by Brad
http://www.mail-archive.com/wtr-general@rubyforge.org/msg06677.html. I was
using element_by_xpath and it didn't work and there was no reason why it
should not work. After investigating I came across the function
create_rexml_document_object in watir.rb, it was using us-ascii
encoding. Standard says we should use UTF-8 and this article (
http://www-128.ibm.com/developerworks/xml/library/x-utf8/) also says the
same. After changing the encoding to UTF-8 I could address all the th
using xpath.



This change should be checked-in in the main branch also, Bret can you give
me access right to check-in? or someone else also can check-in the change.



Brad you can find th using xpath something like this:



th =  ie.element_by_xpath(//th)

puts th.innerText



th =  ie.elements_by_xpath(//th)

for h in th do

puts h.innerText

end



Thanks

--
Prema Arya
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general