Results 1 to 6 of 6

Thread: How To read

  1. #1

    How To read

    I want to write script read test cases parameters from Excel sheet & input test cases into notepad

  2. #2

    Re: How To read


    Could you explain me clearly with an example what you want to do?

    Software Testing Interview Question and Answer

  3. #3

    Re: How To read

    I want to test notepad
    -write testcases & test data in an excel file
    -save expected result in notepad

    then use test complete tool to write script using to
    -run notepad
    -loop to read test cases parameters from excel file
    -inpute test cases in notepad
    -save test result in text file
    -compare test result versus expected

    ***any one can hel me to do this

  4. #4

    Re: How To read


    This function helps to retrieving an parameters for your test cases from an excel file

    i am retrieving only one row value corresponding to an column name using this function.

    Function getActiveValue(strColumnName)

    1 Dim objExcelApp,WS,getColumnName,strRowColumn
    2 Set objExcelApp = CreateObject("excel.application")
    3 objExcelApp.Workbooks.Open ("C:\ExcelFile")
    4 Set WS = objExcelApp.ActiveWorkbook.Sheets("Sheet1")
    5 For i = 1 to 26 'iterating loop for A to Z
    6 getColumnName = objExcelApp.cells(1,i).value
    7 If Utilities.CompareStr(strColumnName,getColumnName) = 0 Then
    8 strRowColumn = chr(64 + i)+ cstr(2)
    9 getActiveValue = WS.Range(strRowColumn).value
    10 Exit For
    11 End If
    12 Next
    13 Set objExcelApp = Nothing
    14 If Sys.WaitProcess("Excel",2000).Exists Then
    15 Sys.Process("Excel").terminate
    16 End If
    End Function

    adjust your 1st row with your column name and pass the column name to this function, this function reads only 2 row if you want to read n number of rows than you have to declare a counter and pass that counter to an function line number 8th

    strRowColumn = chr(64 + i)+ cstr(2)

    chr(64 + i) ' this is constant value for column name
    cstr(2) ' this for row ; you need to change this for reading n number of rows.

    For writing excel data to notepad you can use FSO object for this.

    Software Testing Interview Question and Answer

  5. #5

    Re: How To read

    Hello Altarek,

    Please take a look at the "Data-Driven Testing" help topic - it contains information that will be useful for you, as well as sample scripts demonstrating how to use the feature.
    Alex - SmartBear Support

  6. #6

    Re: How To read

    i just give you head topic help :
    first point : -run notepad
    you have two option to call it
    1-from adding it TestedApp and then call it in script :
    "TestedApps["RunAll"](); "
    2- Use Record to get access its process
    var p1;
    p1 = Sys["Process"]("Notepade.exe");

    to be contiuned ..
    Don’t hesitate to ask



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:37 PM.

Copyright BetaSoft Inc.