[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

passing parameter to WATIR through command line

michael

10/29/2006 1:53:00 PM

I have below code that beautifully calls RUBY, WATIR code through
Microsoft Access.
----------------------------------------------------------------------------------------------------------------------------------
Private Sub Command2_Click()
Call Shell(Environ$("COMSPEC") & " /c c:\Watir\search.rb",
vbNormalFocus)
End Sub
-----------------------------------------------------------------------------------------------------------------------------------

I think it will be much more beautiful if I can pass down values in the
field in Access record to this code.

For instance, when the WATIR code is as below:
------------------------------------------------------------------------------
require 'watir'

ie = Watir::IE.start("http://www.test...)

$parameter = "field_1"

ie.text_field(:name, "search").value = $parameter

ie.button(:value, "Submit").click

------------------------------------------------------------------------------
if the value in "field_1" can be picked from current record field in MS
Access, then I can search through this web site by choosing a value in
the list of records in Access, and click command button that will call
WATIR with parameter passed through the choice I made in Access
records..

Could anyone tell me how I can pass down parameter values in Ruby
through the command line??

I took care of calling ruby from Access.. and it will be so good if I
can call this Ruby from Access with whatever value I choose in Access
record that will be used in Ruby, WATIR..

Thanks..

3 Answers

(Alex Furman)

10/29/2006 6:55:00 PM

0

You can also try SWExplorerAutomation SWEA (http://webunitt...).
You can access SWEA API directly from the Access code.

curious wrote:
> I have below code that beautifully calls RUBY, WATIR code through
> Microsoft Access.
> ----------------------------------------------------------------------------------------------------------------------------------
> Private Sub Command2_Click()
> Call Shell(Environ$("COMSPEC") & " /c c:\Watir\search.rb",
> vbNormalFocus)
> End Sub
> -----------------------------------------------------------------------------------------------------------------------------------
>
> I think it will be much more beautiful if I can pass down values in the
> field in Access record to this code.
>
> For instance, when the WATIR code is as below:
> ------------------------------------------------------------------------------
> require 'watir'
>
> ie = Watir::IE.start("http://www.test...)
>
> $parameter = "field_1"
>
> ie.text_field(:name, "search").value = $parameter
>
> ie.button(:value, "Submit").click
>
> ------------------------------------------------------------------------------
> if the value in "field_1" can be picked from current record field in MS
> Access, then I can search through this web site by choosing a value in
> the list of records in Access, and click command button that will call
> WATIR with parameter passed through the choice I made in Access
> records..
>
> Could anyone tell me how I can pass down parameter values in Ruby
> through the command line??
>
> I took care of calling ruby from Access.. and it will be so good if I
> can call this Ruby from Access with whatever value I choose in Access
> record that will be used in Ruby, WATIR..
>
> Thanks..

Anne G

12/5/2012 6:03:00 PM

0

Le 05/12/12 04:22, GAAslin a ?crit :

> Eud?monix... homophobe! hey bin... personalit? assez complexe merci!

Il aime pas les homos qui ont pas assez de poitrine.

Eudémonix

12/9/2012 8:10:00 AM

0

On 5 déc, 13:03, Anne G <ann.guille@gmail_anti-spam_.com.invalid>
wrote:
> Le 05/12/12 04:22, GAAslin a crit :
>
> > Eud monix... homophobe! hey bin... personalit assez complexe merci!
>
> Il aime pas les homos qui ont pas assez de poitrine.

En plein ça!