Search This Blog

Thursday 27 October 2011

Read( ),Readline( ),ReadAll( ) methods with syntax's


QTP ReadLine(), ReadAll(), Read() SYNTAX

Readline ( ):-
                        We can use this method to read current line from file and move control to next line.

                                                Syntax:-  fo.readline( )

Readall( ):-
We can use this method to read all lines in the file at a time.

                        Syntax:-  fo.readall( )

Read( ):-
                   We can use this method to read specify no:of characters from current line.

                                                Ex:- My name is khan
                                                            ---------
                                                            ---------

                                                X=read(4)
                                                Print(x)                        o/p: My n
                                                                       
                                   
                        

No comments:

Post a Comment