Quality Testing

Quality is delighting customers

# TO COPY THE ODD ROWS FROM FILE1.XLS TO FILE2.XLS

x="c:\\x1.xls";
y="c:\\x2.xls";
ddt_open(x,DDT_MODE_READ);
ddt_open(y,DDT_MODE_READWRITE);
ddt_get_row_count(x,rc);
print rc;
j=1;
for(i=1;i<=rc;i++)
{
if((i%2)!=0)
{
a=ddt_val_by_row(x,i,"name");
ddt_set_val_by_row(y,j,"name",a);
ddt_save(y);
j++;
}
}
ddt_close(x);
ddt_close(y);

# TO FIND WHETHER THE GIVEN OBJECT EXISTS IN THE WINDOW

set_window ("Flight Reservation", 1);
obj_mouse_click ("#32770", 256, 20, LEFT);
rc=obj_exists("Fly From:", 3);
print rc;
if(rc==0)
{
report_msg("Object exists");
 }
 else

 { 
  report_msg("object does not exists");
 }

Views: 48

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service