Hi!

 

Here is the code which I want to call in different Test files

 

def run_check_links(ieHelper)

                       

                        arrayText=["link1","link2","link3"]

                        i=0

                        while i <= arrayText.length-1

                        assert(ieHelper.link(:text, arrayText[i]).exists?)

                        assert(ieHelper.link(:text, arrayText[i]).enabled?)

                        assert_equal("link",ieHelper.link(:text, arrayText[i]).type )

                        i+=1

                        end

            end

 

this method is restricted to check for only 3 specific links. But I want to define array[] as the parameter, and I want to pass any number of links and verify it.

 

Here is what I want to do

 

def run_check_links(ieHelper, arrayText[])

                       

                        i=0

                        while i <= arrayText.length-1

                        assert(ieHelper.link(:text, arrayText[i]).exists?)

                        assert(ieHelper.link(:text, arrayText[i]).enabled?)

                        assert_equal("link",ieHelper.link(:text, arrayText[i]).type )

                        i+=1

                        end

            end

 

I want to use in Helper class and want to call in different test file in the following manner

run_check_links($ie,

                                                “link1”,

                                                “link2”,

                                                “link3”,

                                                “link4”

                                                “link5”

                                    )

 

I hope its Clear. Please help me in this regard

 

Thanks

 

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to