Results 1 to 2 of 2

Thread: I'm not able to write the script for login page

  1. #1
    Geek_Guest
    Guest

    I'm not able to write the script for login page

    I have created datatable in xls sheet (username, password), however I'm not able to write the script for login page. I didnt able to understand how do I fetch the username and password value to login. I am beginner can any one help me out.......Look forward to your reply guys...

    Question asked by visiotor Anurag


  2. #2
    Contributing Member
    Join Date
    Mar 2007
    Answers
    35

    Re: I'm not able to write the script for login page

    Hey Anurag,

    First let me know whether u r using external datasheet or QTP inbuild datasheet.

    If you are using inbuild datasheet,u can fetch the values from the data sheet and pass it to the appropriate fields.see the example below

    Test Case for Yahoo Login :
    Enter the UserName
    Enter the Password
    Click on the Submit button

    Syntax for fetching value from DataTable

    Variable1 = DataTable("","")
    Variable2 = DataTable("")

    Example :

    Let me say ur Action Name be "Login".
    Your field name will be "UserName" and "Password"

    v_strUserName = DataTable("UserName","Login")
    v_strPwd = DataTable("Password","Login")

    Browser().Page().WebEdit().Set v_strUserName
    Browser().Page().WebEdit().Set v_strPwd
    Browser().Page().WebButton().Click

    To run more than one iteration, go to Keyword view,Right click the appropriate action name,select Action Call Properties option,from their select your own option. Another alternative way is like.... you can use For..Next looping statement to retrive more than one row from the data table.


    Hope u got some idea now!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact