Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

WinRunner: How to read dynamic names of html_link
Answer1:
Use the following steps :
> Using the Function, web_tbl_get_cell_data read the link.
> use GUI_add function to add to the Map editor.
> use GUI_save function to save the same link.
> Now, web_link_click() and pass the variable that we got in step.
Answer2 :
Can try this method. It will reduce the complexity and there is no need to update the GUI Map File. Use web_tbl_get_cell_data() function to get the Description of the link and use the variable name in web_link_click() function.
web_tbl_get_cell_data("Tablename","#Rowno","#columnnumber",0,cell_value,cell_val ue_len);
web_link_click(cell_value);
Answer3 :
> get number of row in your table: tbl_get_rows_count ("tableName",rows);
> write a for loop: for(i=0;i<=row;i++)
> get text of specified cell with column and row:tbl_get_cell_data ("Name","#"&i,column,var1);
> compare with the if condition
> if true : make any flage and take row number in variable m
> now end the loop and write
tbl_set_selected_cell ( "tableName", "#"& m,column);
type ("<kTab><t2><kReturn>");
Example :
tbl_get_cols_count("Name",cols);
tbl_get_rows_count("Name",rows);
for(i=2;i<=rows;i++)
{
for(j=1;j<=cols;j++)
{
tbl_get_cell_data("Name","#"&i,"#"&j,var1);
if(var1 == Supplier)
{
m=i;
}
}
}
tbl_set_selected_cell ( "Name", "#"&m,"#"&j type ("<kTab><t2><kReturn>");