How to use addScript & runScript in selenium IDE

View: New views
1 Messages — Rating Filter:   Alert me  

How to use addScript & runScript in selenium IDE

by Bhargav :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

I need help in using the above two commands, in order to select a link which is of the form

<td nowrap="" align="CENTER">
Select >
</td>

I am not able to click that "Select >" link which comes in a window . I am able to click on the other links of that window.

so wanted to add this below script using addScript of selenium IDE ..
function tclickselect()
        {
                var link;
                var children;
                var entries;
                var j;
                var menuNames = new Array();
       
        link = document.getElementsByTagName( 'a' );
        alert(link.length);
                for ( j = 0; j < link.length; ++j )
                {
                        entries = children[j].textContent;
                       
        if(entries.length>0 )
                        {
                entries =link[1].split(":");
               
                            return(entries[1]);
                               
                        }
                }
        }


Please suggest a solution to this issue.

Thanks,
Anil.