AdventNet Inc - Excellence Matters
Store  |  Reseller  |  Toll Free US: +1 888 720 9500 | Intl: +1 925 924 9500
  • AdventNet Home
  • OEMs and Developers
  • Enterprise Management and Security
  • Software Testing
  • Database Search and Migration
  • Support and Services
Home > Products > QEngine > Technical FAQ

Technical FAQ - Web Functional Testing



General :

1. Does QEngine support any other browser than IE?

    QEngine does support Firefox and Mozilla browsers apart from IE.

2. Is Toolbar is necessary for the Web Testing in QEngine ?

    Yes, you need to install the toolbar in the respective browsers with which you plan to test the web application.

3. Does QEngine has any restrictions for number of lines in a single script?

    QEngine registered version does not have any restriction for number of lines in the script.

4. Does QEngine support record and playback over ActiveX controls ?

    QEngine does support record and playback over ActiveX controls in Analog Mode. For recording any ActiveX control, choose the "Switch to Analog Mode" option from the drop down available next to "Start Record" button in the QEngine toolbar. And then record the actions. The actions will be recorded as "fireEventAtPosition".

5. Does QEngine support record and playback over Flash Controls ?

    QEngine does support record and playback over Flash controls automatically in Analog Mode. While recording any action over Flash Controls, QEngine will automatically record the actions in "Analog Mode" appropriate to the action performed over the flash control.  The Coordinates will be taken with respect to the Flash object and not to the whole Screen Coordinates. Hence moving Flash objects after the recording won't affect the playback.

6. Does QEngine support AJAX based application ?

    Yes, QEngine supports AJAX applications fully. In the Built-in Functions QEngine has separate category for "Ajax Functions" which can be used with AJAX rich Web Application to proper playback.



Recording :

1. Whether scripts needs to be authored manually in QEngine?

    No, QEngine will generate script when you record a scenario with your web application. You will be also able to create testcases with a point and click. The recorded actions will be stored in a script format which can be played back. If you wish to manipulate any data inside the script you can edit the script as you want.

2. Does QEngine record / playback File Dialog opened through "Browse" button ?


       QEngine does support record / playback of Choose File Dialogs.  To record the same follow the steps given below to upload a file,
  • Click on the "Browse" button from the web page.
  • Always browse and provide the file from the "C:\". To change to "C:", select the "C:" from the drop present in the "Choose File" window.
  • From the C:\ double click on the folders and browse to the location where the file resides. Make sure the folder you select are in the viewable area in the Choose File window. i.e, QEngine will not scroll and find the folder / files. Hence the folders should be visible without scrolling iteself.
  • Now select the file to be uploaded by single click and click "Open" button.
Note: QEngine wont record the single click on the folder. Hence if you open the folder by single click on it and then by clicking open button it will fail during playback. So use double click to open the folder during recording.

3. Does QEngine record / play the alert window popup?

    Yes, QEngine does support record / playback over  “Alert”,“Confirm”, “Prompt”, “Security”, “Authentication” , “Open (Browse)” popups. We can also insert Testcases to validate the message shown in the popup.


4. Does QEngine support modal / modeless dialog windows?

    Yes, QEngine does support record and playback in modal and modeless dialogs fully.

5. What does the numeric value at the end of each script line means ?

    The numeric value in each script line represent the time taken (in seconds) by the user between each action while recording . So in each and every recording line QEngine will store the actual time taken between the current action and the previous action as the last argument.
    Example:
        setWindow(“Login Window ID”,5)
        setText(“username”,”admin”,2)
        setText(“password”,”Adsnge”,2)
        clickButton(“Login”,3)
       
        In the above the number parameter in each script line is the time taken between each and every actions during recording. During playback QEngine will wait for these seconds before doing the corresponding actions. You can also instruct the QEngine to skip these wait time by selecting the “Fast Mode” under settings.

6. How to record click over the button inside the Flash object?

        To click in the flash button follow the below steps :
    1. While recording click on the button inside Flash Object, it will automatically get recorded as fireEventOnObject with X,Y co-ordinates of the button with respect to the start of the flash object.
                Example:
                     
                    fireEventOnObject("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","object","372","380","click","NONE")

7. How to record set a text to the text field inside the Flash object?


            To set a text value in the flash text box follow below Steps:
    1. While recording click inside the text box.
    2. This will record the fireEventOnObject with the action as "click".
    3. Continue with the recording process to and type in the text inside the text box and proceed with further recording.
    4.  Once the recording is completed, the recorded action over Flash object

              fireEventOnObject("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","object","372","380","click","NONE")

              To set a text in the text field, change the following properties in the above function,
              change click as settext
              change NONE  as  value to be set in the text field.

              Modified functiona call is,
              fireEventOnObject("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","object","372","380","settext","QEngine")
                            where the click action is changed to settext and the message "NONE" is changed to Value to be set in the text field.


8. How to record the mouseover in a dropdown menu list?

         Recording of mouseover actions can be switched on / off. Also there is time period after which only the mouseover actions will be recorded. Otherewise moving mouse over any of the element will record the mouse over action. Record the mouse over action as explained below,
    1. Start the recording from QEngine toolbar.
    2. From the drop down next to Start Record button, select "Enable Mouse Over Recording" option. This will enable mouse over recording.
    3. Now proceed to record your application.
    4. To record mouseover action on any element keep the mouse pointer over the particular element for the 2 seconds. This will recognize the mouseover action and record the mouseover action over the particular element.
        Note:    In the Settings page, under Recorder Settings, you can configure the wait time to recognize the mouseover on any element. By default it is configured as 2 seconds. You can also configure the  HTML element over which  you wish to record mouse over action and deselect other HTML Elements shown in the combo.

9. How to record double click in the grid element?

        By default QEngine will recognize only click action. To simulate double click follow the steps as below,
    1. Record the click action over the element.
      Example:
                 
      clickElement("elem1",2)
    2. Then change the function to "doubleClick".
      Example:
                   doubleClick("elem1",2)
10. How to record the right click action?

       By default QEngine will recognize only click action. To simulate right click follow the steps as below,
  1. Record the click action over the element.
    Example:
               
    clickElement("elem1",2)
  2. Then change the function to "showContextMenu".
    Example:
                 showContextMenu("elem1",2)

Script and Suite Related :

1. How to group the related scripts under a separate module?

       While creating the script provide script name as
             <module_name>/<script_name>

       Example:
             To create a script "login" under the module "common", provide the scriptname as below,
                   common/login

2. How to  rename the script?


    To rename a script right click over the particular script that needs to be renamed, from the Suites tree, and choose the option "Rename" and provide the name for renaming.

3. How to rename the suite?

    To rename a suite, use the "Rename Suite" option available in the Suite Manager page and rename the suite.

4. How a script from one Suite can be copied to another Suite in QEngine?

        Yes, you can move the script from one suite to other suite. You can use the “Save In Suite” option to do this. If you right click the corresponding script node in the tree, QEngine will list many options including the “Save In Suite” option. Select this option and choose the corresponding suite.

5. Does QEngine has support to protect Suites / Scripts from unauthorized access ?

       QEngine does have option to protect the suites created by an user from unauthorized access. There is an option called "User Administration" available in QEngine, which needs to be enabled under the "Admin" Tab. Then the user can give access privilege to other users to view / modify the suite created by him.
  • The user with “View Access” can only view the suite / scripts created, and cannot modify the scripts present in the suite.
  • The user with "No Access" can't view the suite at all.
  • The user with "Full Access" can modify the script / testcase created in the suite.
6. How can we move the suite from one QEngine installation to another?

    You can use the export and import to do this. For e.g, To move the suite from machineA to machineB follow the below steps.
    1. Using “Export Suite” option export the respective suite from the machineA as “.qed” file.
    2. Transfer the “.qed” file to the corresponding machine.
    3. In machineB choose the “Import Suite” option and configure the “.qed “ file.

Script Syntax :

1. What language QEngine scripts are based on?

    QEngine script is based on Jython Scripting Language. Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly  integrated with the Java platform. It thus allows you to run Python on any Java platform.

    The link below will help to customize the QEngine script for your scenarios.
    http://www.jython.org/Project/index.html

2. How to define ‘if-else’ condition in QEngine script ?

    You may use the IF-ELSE statement in QEngine as follows:

    Syntax:
        if expression:
            (provide a tab)statement to be executed
        else:
            (provide a tab)statement to be executed
    Example:
        x=1
        if x>0:
            (tab)displayMessage("x is positive")
        else:
            (tab)displayMessage("x is negative")


3. How to define ‘for’ loop in QEngine script ?

    For loop:

        The for loop statement is used to perform iterative looping. It processes a sequence returned from the supplied expression, taking each element in turn. As long as elements remain in the sequence, the loop is executed. The for statement has the following forms:

    Syntax:          
        for vars in expression:
            statement
    Example:
        for i in range(0,10)
            (provide a tab)displayMessage("The number is =" + i)

    Kindly follow this link to get more info on using the forloop:
    http://www.adventnet.com/products/qengine/help/tutorials/adding_webfunctional_tc/illustrating_for_construct.html

4. How to define 'while' loop in QEngine script ?

    While loop:

        The while statement is used to perform conditional looping. As long as the expression evaluates to true, the loop is executed.

    In QEngine, you can use the while loop as follows:

    Example:
       
While X>0:
            (provide a tab)callScript("Test1","Test1")
        else:
            (provide a tab)statement to be executed

5. How to use mathematical operator in QEngine script ?

        '+' symbol can be used as follows:
        i=1+2
        displayMessage(i) # to display the result in the outfile.

        '-' symbol can be used as follows:
        i=5-1
        displayMessage(i)
   
        '*' symbol can be used as follows:
        i=5*5
        displayMessage(i)
       
        '/' symbol can be used as follows:
        i=25/5
        displayMessage(i)

6. How to add comments to the script ?

      You can add your own comments in the script by beginning the line with "#" symbol.

7. How to use string / int variable in QEngine Script ?

       The Example below illustrates the variable declaration in QEngine script,
       Example:
         
            variableA=25  // decalration for int variable
            variableB=”Use this string”  // declaration for string variable

8. How to convert a string variable to an integer variable in the script?

        You can convert a string variable to int value as explained below,
           
            variableA=”25” // decalaring a string variable which can be casted to numeric value
            variableB=int(variableA) // now the value stored in the string variable is casted into int value.

Script Programming :

1. How to select multiple options in a select / combo box?


        To select multiple options in the select box use :-: operator,(or) while recording hold ctrl key to record multiple options

        Example:
            selectItem("Department","Acccounts:-:HRD",1)

2. How to deselect all the options in a select / combo box?


        To deselect all the options in the select box use _QE_DESELECTALL as value in selectItem.

        Example:
            selectItem("Department","_QE_DESELECTALL",1)

3. How to remove the text from my text field?

        To remove the text from the text field use  _QE_BLANK as value in the setText:
       
        Example:
            setText("q","_QE_BLANK",1)
            Where _QE_BLANK clears the text from the particular text field.

4. How to call a QEngine script within another QEngine script ?

        In QEngine you can call a script from another script using "callScript" function.
         
          Example:
               
You can call the script ‘B’ from script ‘A’ like below,
               
                    callScript(“B”,”B”)

                If you need to call the script which was grouped under any <Module Name> say “Module1”,then you can call the script as below.

                    callScript(“B”,” Module1/B”).

5. How to stop the script execution inside a script ?

        To can stop the script execution from the script use stop() function available in built-in functions.
        This will stop the current script execution and will proceed with the next script.

6. How to stop the test execution of all the scripts in the suite ?

       To  stop the test execution of whole suite use stopAll() function available in built-in functions.
       This will stop the test execution of whole suite and then proceed to generate reports for the test execution underwent.

Database :

1. How to retrieve the values from a Database table to use it in the script ?

       To retrieve the values from a Database table use getDBValues("<Query>").

        Example:
           
            result=getDBValues("Select * from LoginTable")
            for i in range (0,len (result)):
                for j in range (0,len (result[i])):
                    displayMessage (result[i][j])

2. How to write a value into a database table from the script?

        To write a value in your database table from the script use writeToDB("<insert query>") function which is listed under the database functions in "Insert Built-in Functions".
       
       
Example:
            result=writeToDB("Insert into employee (emp_id,emp_name,dept) values ('emp1','peter','payroll')")

3. Does QEngine allow to fetch set of values from the database table to use it in the script?

        Yes, QEngine does allow getting the values from the database tables to use it in the script.  You should first create a dataset, which should be configured as below,
  • Click on the  ‘Data Configuration’ link present above the script editor to create a dataset (DataSource) with the corresponding Database details.
  • Configure the Database details from where the values needs to be picked up such as, Database name, URL , Query etc.,
  • Once you have configured all the details, click the “Paste” button.
  •  QEngine will automatically insert the intialization and data fetching lines in the script for the configured dataset as below.
                initDataSet("TestDB")  // initialize the database configured for this ID in the Data Configuration
                result = getValuesFrom("TestDB")  // retrieve the values from the database and store it in the two dimensional array

               The above will store the data fetched from the database into the result variable.
                Then the result variable can be iterated and values can be obtained.

CSV :

1. How to fetch the values from a CSV file to use it in the script ?

        To fetch data from a CSV file:
    1. Open the  "Data Configuration" Screen through the "Data Configuration" link present over the script editor.
    2. Click on "New" to add a new data source.
    3. In the Add/View Data Configuration screen, from the Select DataSource Type combo, select the datasource type as CSV.
    4. Enter the appropriate values for the following fields:
      1. Select the csv file from the CSV File Name combo (if already available in <QEngine_Home>/projects/<Suite_Name>/dataset> directory) or create a new csv file name by clicking the Create CSV File link. Please note that the csv filesdisplayed in the combo and the newly created csv files are placed in the server in <QEngine_Home>/projects/<Suite_Name>/dataset> directory.
      2. Enter the start row index, end row index, start column index and end column index value from where the csv values has to be fetched. End row and end column index is optional.
      3. Click the Apply button and then click Paste. This will paste the following script in the script editor.
                                initDataSet("CSV_login")
                                result = getValuesFrom("CSV_login")
                                for i in range(0,len(result)):
                                    var1=str(result[i][0])
                                    var2=str(result[i][1])
                                    setText("yourname",var1,3)
                                    setText("dept",var2,3)

             The above sample illustrates handling of single dimensional array of values from CSV.
             In the above sample script, var1 and var2 takes the values from the CSV file. You can replace the original value entered while recording by this variable to playback with different values from the CSV file.

2. How to write a value into a CSV File from the script?

        To write a value into a CSV file from the script by using the inbuilt function  writeToCSVFile()
       
       
Example:
           
writeToCSVFile("abc.csv",result,"false")
       
        For more info, please refer this link:
        http://forums.adventnet.com/viewtopic.php?t=6850

3. Can QEngine allow to fetch values from multiple CSV file in the Script?

    Yes, QEngine does allow fetching the values from multiple CSV file to use it in the script at the same time. After the dataset configuration, you can change the inserted lines as below,

            initDataSet("TestCSV")
            result1 = getValuesFrom("TestCSV")
           
            i.e., rename the variable “result” as “result1”, Now you can configure another dataset and you can store it in another variable called “result2”. Thus you can fetch and use the values from multiple CSV files in the QEngine script.

Data Driven :

1. How to do the login/logout action sequence in a web application for 50 times with different username & password?

        You can repeat the login/logout action sequence in web application for 50 times by configuring 50 usernames and password through the data configuration. You can fetch data either from the CSV file or from a database.

For more info, follow this link:

http://www.adventnet.com/products/qengine/help/context_sensitive_help/data_configuration.html

Variables :

1. How to pass a value from one script to another script?

        You can pass a value from one script to another script by declaring the varible in setGlobal() function.

       
Example:
           
            setGlobal("var1","test1")

            If you want to use this varible in a different script, you can retrieve the value by using the function getGlobal()

       
Example:

            result = getGlobal("loopstring")

2. How to use a variable from the script inside a test case?

       The variable set using setTestVariable("<var_name>","<var_value>") can be used inside the testcase.

       Example:

          setTestVariable("var1","QEngine")

          Inside a testcase configure value for any check property as TEST_VAR('var1')

          By this you can use the script variable inside testcase.

Built-in Functions :

1. How to compare a value from the webpage with the database table value ?

        To compare a value from the web page with the database table value follow the steps as below,
    1. Get the value from the web page that needs to be compared by using the function webGetText() or getCellValueAt()
    2. Set the above retrieved value in to a test variable using
              setTestVariable("data","<Value_Retrieved_From_Web>")
    3. Go to insert test case and select DBcheck, select the appropriate database
    4. Select table values and provide the query.
    5. In the conditions combo box select equals, and then click on expected values. In the expected values window, provide the column name in which the value has to be checked and the num of rows and provide the value as TEST_VAR('data') and then click Apply.
    6. Run the test after applying the settings.

2. How to compare a value from the webpage with the CSV value?

        To compare a value from the webpage with the CSV table value follow below steps:
  1. Get the value from the web page that needs to be compared by using the function webGetText() or getCellValueAt()
  2. In the data configuration, select the CSV file in which the values needs to be checked. Then, click paste button to paste the corresponding script in the script editor.
  3. Now you can compare the value from the web page with CSV file.
       
    Example:
              initDataSet("test")
              csvvalues = getValuesFrom("test")
              result=getAllHTMLTableCells("Table1")
              for i in range(0,len(result)):
                     var1=str(csvvalues[i][0])
                     webresult = str(result[i][0])

                     if webresult==var1:
                            displayMessage("Value matches in webpage and CSV file")
                     else:
                            displayMessage("Value doesn't matches in webpage and CSV file")

    In the above the array of values retrieved from the web page table is compared against the array of values present in a CSV file.

3. How to retrieve the value present in the HTML Table cell ?

        To retrieve the value present in the HTML Table cell, use the function getCellValueAt() as described below,
    1. Start the recording and invoke Function Generator by clicking on "Insert Built-in Functions" link above script editor.
    2. Select the "HTML Table Functions" category.
    3. Select the "getCellValueAt" function from the Functions combo.
    4. Click the link "Click to Proceed..."
    5. In the Application window click over the HTML Table cell from which the value needs to be retrieved.
    6. The details of the table and table cell will be populated in the Function Generator.
    7. Click on the "Paste" button to insert the data into QEngine Script.
                Example:
                    result = getCellValueAt("tableid",2,2) # Arguments are Table ID linked in the GUI Map, row id and column id from where the value needs to be retrieved.
                    displayMessage
(result)

4. How to click over the set of radio buttons present in each row of an HTML Table one after one ?

        To click over the radio buttons present in each row of an HTML table one by one, follow the steps below:
    1. Get the number of rows present in the table by using getHTMLTableRowCount() function.
    2. Then using for loop , click the element by using the fireEventOnCellElement() function by giving the row count in a variable from the forloop.
                    Example:
                        rowcount = getHTMLTableRowCount("Table1")
                        displayMessage(rowcount)
                        for i in range(0,rowcount):
                        fireEventOnCellElement("Table1",i,2,"click","NONE","NONE","NONE","NONE",1)
                       
                        Where i is the row index.

5. How to find whether a given string is part of another string ?

         Use indexOf() function from Built-in functions of "Function Generator" to find the given string is part of another string.

          Example:
                   result = indexOf("AdventNetQEngine","QEngine")
                   displayMessage(result)

                    The output of above snippet is 9.

                    If the given string not present in the another string then it will return "-1"

6. How to retrieve a portion of a given string ?


        To get the portion of a given string use substring function as explained below,

          Example:
                result = subString("AdventNetQEngine",9,16)
                displayMessage(result)

                The output is QEngine.

7. How to replace a portion of string with another string ?

        Use replaceAll() function to replace a portion of a string with another string.

          Example:
                result = replaceAll("AdventNet QEngine","QEngine","Appmanager")
                displayMessage(result)

                The output is AdventNet Appmanager

8. How to invoke a batch/sh/exe file from a script ?

        To invoke bat/sh/exe files use invokeApplication function available in built-in functions.

         There were four functions namely,
    • invokeApplication - to invoke the given application
    • invokeApplicationWithArgs - to invoke the application with arguments
    • invokeApplicationInThread - to invoke the application in a thread
    • invokeApplicationInThreadWithArgs - to invoke the application in a thread with arguments
          Example:
                invokeApplicationWithArgs("C:\\Vim\\gvim.exe","C:\\test.txt") # multiple arguments should be passed in the same argument with single space " " separator.

9. How to report the validation performed in the script to report ?

         To report the status of validation to the Testcase report use reportTestCase function from built-in functions,
           
          Example:
                reportTestCase("Validation-001",0,"Test Passed","ShowStopper")
                where  0 is Passed and 1 is Failed.

          To report the status of validation to the script report use reportStatus function from built-in functions,

          Example:
                reportStatus("Scr-001",0,"Test passed")
                where  0 is Passed and 1 is Failed.

10. How to print a value in the testout file ?

        To print a value in the testout use displayMessage function from built-in functions.
       
        Example:
            
displayMessage("A is greater than B")

11. How to capture screen shot of the application browser during test execution ?

          To capture screen shot of  the application window use saveScreenShot() function from built-in functions.

       Example:
            
saveScreenShot("error",1) # arguments are filename to save the screen shot and wait time before invoking the function.

12. How to fetch all the values from a HTML Table column and use it in the script?

        To fetch the values from the HTML Table column use getHTMLTableColumnvValues() function from built-in functions.

        Example:
            result = getHTMLTableColumnValues("Table1",1) #fetches all the column values under the specified table identified through Table1 properties
            for i in range(0,len(result)):
                displayMessage(str(result[i]))

13. How to fetch all the values from a HTML Table and use it in the script?

        To fetch all the values from the HTML table use getAllHTMLTableCells() from built-in functions,

        Example:
            result=getAllHTMLTableCells(""Table1")
            for i in range(0,len(result)):
                for j in range(0,len(result[i])):
                    displayMessage(str(result[i][j]))

14. Does QEngine support to manipulate any string / int data inside the script?

        QEngine does support to manipulate any string/int data inside the script.

        For int manipulation you can use any mathematical operator such as +,-,*,/ inside QEngine script.
       
        For string manipulation QEngine provides you many functions like Java,
    1. length
    2. indexOf
    3. subString
    4. split
    5. startsWith
    6. endsWith
    7. toUpperCase
    8. toLowerCase
    9. replaceAll
    10. replaceFirst

Script Sequencing and Execution :

1. How to execute the scripts in a defined sequence ?

        Using the sequence editor option under the settings option, we can define the order for the script execution. In the sequence editor, create a new sequence template and define the script order in which you wish to execute the script and save the sequence. Now to play the scripts in the defined order, select the suite and click on the link "Start Play With Filter / Sequece" and choose "Sequence" option and select the appropriate seqeuence from the list to play the scripts in the defined order.

        For more info, refer the page below:
        http://www.adventnet.com/products/qengine/help/context_sensitive_help/sequencing_test_scripts.html

2. How to execute all the scripts present in the suite?

        Select the appropriate suite from the Suite tree and then click on the "Start Play" button available in the right side screen or in the toolbar. This will execute all the scripts present in a Suite.

3. How to execute the scripts in regression ?

        To execute the script regression, you should schedule the suite and scripts for the regression under the Regression Tab.

        For more help on configuring and executing test in regression is available in the following link,
        http://www.adventnet.com/products/qengine/help/test_manager/executing_test_fromcommandline.html

4. How to execute the scripts in a remote machine?

          To execute the test in a remote machine, we should finish the Prerequisites available in the below link,
             http://www.adventnet.com/products/qengine/help/test_manager/commandline_testing_prerequisites.html

              Then configure the schedule for Remote Host with the help in the below link,
             http://www.adventnet.com/products/qengine/help/test_manager/scheduling_tests.html#Schedulin_Operations

5. How to execute only selected scripts in a suite?

        To execute only the selected scripts use Filters to filterout the scripts based on matching criteria.

         For more help on configuring scripts follow the below link,
          http://www.adventnet.com/products/qengine/help/context_sensitive_help/configuring_test_filters.html


6. How to stop the script execution wherever needed, manually?

            To stop the playback click the “Stop Play” button either from the QEngine Window or QEngine Toolbar. This will stop the test execution and generate the reports.

7. How does QEngine handle if any page is loaded with delay during playback?

        By default, During playback QEngine automatically wait for 60 seconds for the page to load completely. If the page appear within 60 seconds then QEngine will proceed to further script playback immediately.
       
        The time to wait for page loading can be modified in the settings under Replay Settings-> Maximum wait time during play field.

8. Does QEngine support to run all the scripts in a suite in sequence?

        QEngine does support to run all the scripts in a suite in sequence. One can use Filters or Sequence template to execute the scripts in sequence.
        In the normal QEngine will automatically form a sequence in alphabatic order to execute the suite.

        Using Filter , the scripts matching the criteria are filtered out and sequence will be created in the alphabatic order.
        Using sequence, the script sequence defined in the sequence template will be taken and sequence will be formed as in the sequence template.

       To playback the scripts in the any of the sequence, select the suite in the tree and start the play through the "Start Play With Filter / Sequence  link.

Dynamic Functions :

1. How to click a button element whose “id/name” value changes dynamically?

        To click a button whose id / name changes dynamically, use fireEventOnElement function from built-in functions.

        Syntax:
            fireEventOnElement("tagName", "propertyName", "propertyValue", index,"actionName", "actionValue", "useRegExp")
            Where
                TagName=Tag name of the elements to be identified.select in your case
                Propertypropertyname = Property to be matched.id/name of select element
                propertyvalue = Property value to be matched. value of id/name
                index = Occurrence of the elements.
                actionName= select in your case
                actionValue= Option value to be selected
                regExpRequired =true/false.

        Example:
               
                fireEventOnElement("input","id","button_*",1,"click","NONE","true")
               
In the above, the HTML Input element whose id property starts with button_ will be obtained the click event will be fired over the element.

2. How to handle if the title of the application window changes dynamically ?

        To handle the dynamically changing window title use the function setDynamicWindow() from built-in functions.

       
Syntax:
                setDynamicWindow(parent_window_title,parent_window_index,frame_window_title or frame_window_name,value_of_frame_title or value_of_name,frame_window_index)
                Where
                    parent_window_title is Title of the browser window
                    parent_window_index is occurence of the browser window with the same parent window title if any. Otherwise specify 1.
                    frame_window_title or frame_window_name is the property of the frame window name or title which is to be used for the window identitfication.
                    Value for the Title or Name specified in the 3rd argument.
                    frame_window_index is occurence of the similar frame window if any. Otherwise specify 1.

       
Example:
               
                setDynamicWindow("AdventNet",1,"frame_window_title","payroll",1)
                In the above the Browser window with title "AdventNet" will be searched and in the browser window frame window with the title "payroll" will be searched and set.


Checkpoints & Testcases :

1. Does checkpoints needed to be added manually ?

        In QEngine there is an option to add checkpoints / testcases. Hence there is no need to add checkpoints manually.

2. How to validate  the property of a HTML element present in the webpage?

        To validate the property of a HTML element in the webpage use checkpoints / Testcases.

        Follow the below URL for inserting checkpoints in the script,
        http://www.adventnet.com/products/qengine/help/context_sensitive_help/inserting_functions.html

        Note: Checkpoints can be inserted while recording only.

3. How to insert checkpoints QEngine ?

        To insert checkpoints in QEngine follow the below steps,
    1. Start the recording of the application.
    2. Click on "Insert Checkpoints" and from the Check Points window, click on "Click to Proceed" link.
    3. Select the appropriate element in the web page.
    4. The element properties will be populated in the check point window.
    5. Click on the "Paste" button to add the checkpoint string in to the script.
4. How insert testcase to validate multiple property of a HTML element ?

        To insert testcase to validate multiple property of a HTML element in QEngine follow the below steps,

    1. Start the recording of the application.
    2. Click on the "Insert Testcase" link and in the "Testcase Configuration" provide testcase id, description etc.,
    3. Select the ‘HTML-Check’ and select ‘element’ option in the "Testcase Configuration" window.
    4. Then select the element to be validated from the web page.
    5. The properties of the element will be listed in the "Testcase Configuration" window.
    6. Select / deselect the properties that need to be validated.
    7. Click on "Commit to List" to save the configuration.
    8. Click on "Apply" to save the testcase and insert the script function in the script.
       Note: Testcase for HTML elements can be inserted only during recording.

5. How to validate the presence of a text in the webpage ?

        To validate the presence of a text in the webpage use webCheckText() from built-in functions.

          Syntax:
             webCheckText("<Search_String>","<Prefix_String>","<Suffix_String>")

             The whole webpage content will be searched for the given search string with given Prefix and Suffix String. If Prefix and Suffix String are configured as NONE then only search string will be searched.

          Example:
            
webCheckText("QEngine","AdventNet","WebTest")
             on Success it will return 0 , on Failure return 1.

6. How to validate the option selection in a select box ?

        To validate whether particular option is selected or not in a select box use selectCheckInfo() function from built-in functions.

         Syntax:
             selectCheckInfo("<Element_ID>","<Property_To_Validate>","<Expected_Value_Of_The_Property>")

       Example:
             selectCheckInfo("countrycombo","selecteditems","India")

7. How to validate the multiple properties of a HTML element present in the webpage?

        To validate multiple properties of the same element use testcase. In testcase all the properties of the same HTML element can be validated.

        Follow the below link to insert testcases in a script,
        http://www.adventnet.com/products/qengine/help/context_sensitive_help/adding_testcases.html

       Note: Testcase for HTML elements can be inserted only during recording.

8. How to validate data addition in to the database table ?

        To validate the database table entry use DBcheck option in testcase.
        Follow the steps to insert DBcheck testcase :
    1. Click on the insert testcase and then select DBcheck.
    2. Configure the DB details and select the option 'Table Values'.
    3. Type the appropriate query to pull the data from the table.
    4. Click on the expected values with the condition equals. Give the number of rows and the column name which you want to search from the database.
    5. Apply the settings and run the test.
9. How to validate message text displayed in the alert popup ?

        To validate the message text displayed in the popup, use staticCheckInfo function.

         Example:
               
setAlertWindow("Microsoft Internet Explorer",2)
                staticCheckInfo("Static", "value","<Message_displayed_in_the_popup>")

10. How to validate multiple HTML element exist in the same webpage ?
       
        To validate multiple HTML elements present in the same webpage use testcase in QEngine. Inside a single testcase you can validate all the elements of the webpage.
         To insert testcase for multiple elements in the testcase follow the below steps,
    1. Start the recording.
    2. Invoke the "Testcase Configuration" window through the ‘Insert Testcase’ link present above the script editor of QEngine window.
    3. Select the ‘HTML-Check’ from the type of testcase and ‘element’ option in the "Testcase Configuration" window.
    4. Now select the element to be validated from the webpage and click on the "Commit To List" to save the configuration.
    5. Click on the "New" button to create checkpoint for the next element.
    6. Similarly continue the Step 3 to Step 5 for the elements that needs to be validated in the webpage.
    7. After creating validation for all the element, click on "Apply" to save the testcase and insert the executeTest function in the script.
         Note: HTML-Check Testcases can be created during recording. For creating DB-Check testcase recording is not necessary.
                   In the above testcase you can also insert DB-Check.

11. How to validate a HTML Table content in QEngine ?

        To validate HTML Table content of the webpage, use testcase with "HTML-Table check" or "HTML Table Functions" in the built-in functions.

         To validate HTML table by adding testcase follow the below steps,
    1. Start the recording
    2. Invoke the "Testcase Configuration" window through the ‘Insert Testcase’ link present above the script editor of QEngine window.
    3. Select the "HTML-check" option and "Table" option to add testcase for the HTML table.
    4. Select the appropriate cell of HTML Table from the webpage.
    5. The properties of table and the cell value of the selected cell will be added to the check properties of testcase, that will be validated during playaback.
    6. Click on "Add" button to add more checkpoints to the HTML table.
       To validate HTML table using built-in functions,
    1. Click the ‘Insert Built-In Functions’ link.
    2. Select the “HTML Table Functions“ category, choose the appropriate function to check.
    3. Click the link ‘Click To Proceed’ and select the HTML table from your application page.
    4. Click on "Paste" button to add the checkpoints inside the script.
        Note: To check the single property you can use check functions instead you can use testcase to check the multiple property.

12.How to validate the Database table properties inside the script ?

        Using "Database Functions" of built-in functions you can validate the database table inside script.
         Follow the below link for help on inserting "Database Functions",
          http://www.adventnet.com/products/qengine/help/built_in_functions/database_functions.html

13. Does QEngine have any restriction on number of checkpoints / testcase can be added in a script ?


        QEngine doesn’t have any restriction in number of checkpoints / testcases configurations for a single script. You can configure any number of checkpoints / testcases in a single script.

14.How to validate the elements present in a modal / modalless dialog ?

        To validate the elements present in the modal / modalless dialog use the checkpoints /  testcases as used in normal HTML Window.

Retrieving Values from Web Page :

1. How to retrieve data from the webpage to use inside the script ?
     
         To retrieve data from a HTML Element use "HTML Get Functions" category functions.

        To retrieve a value from a text field, use editGetInfo function from the built-in functions. To insert the above function follow the steps given below,
    1. Start the recording and browse to the page where the particular text field exists.
    2. Open the "Function Generator" by clicking the link "Insert Built-in functions".
    3. Select the "HTML Get Info" category and select the "editGetInfo" function from the functions combo.
    4. Click on the "Click to Proceed" link next to Function combo.
    5. From the Web Page Click on the text field from where the value needs to be retrieved.
    6. This will populate the Element ID and the various property that can be retrieved for the particular element.
    7. Choose the "Value" from the property combo to retrieve the value present in the text field.
    8. Click on the "Paste" button to paste the function in the script.
 
                Example:
                    result=editGetInfo("textfield","value")
                    displayMessage(result)

         To fetch any page text from your application you can use “webGetText” function.

                Example:
                     
result = webGetText("<Prefix String>","<Suffix String>")
                      displayMessage(result)

2. How to retrieve the option elements present in a select box ?


        To retreieve the option elements of a select box, use selectGetInfo() from built-in functions.
         To insert the above function inside script follow the below steps,
    1. Start the recording and browse to the page where the particular text field exists.
    2. Open the "Function Generator" by clicking the link "Insert Built-in functions".
    3. Select the "HTML Get Info" category and select the "editGetInfo" function from the functions combo.
    4. Click on the "Click to Proceed" link next to Function combo.
    5. From the Web Page Click on the text field from where the value needs to be retrieved.
    6. This will populate the Element ID and the various property that can be retrieved for the particular element.
    7. Choose the "Value" from the property combo to retrieve the value present in the text field.
    8. Click on the "Paste" button to paste the function in the script.
         Example:
                result = selectGetInfo("communication","itemcount")
                displayMessage(result)
                The result will give the number of option elements present in the select box communication.

3. How to get the number of links present in a webpage?

        To get the number of links present in the webpage use getHTMLElementCount() from built-in functions.

         Example:
               
result = getHTMLElementCount("A")
                displayMessage(result)

4. How to get the number of rows/columns present in the HTML table?

        To retrieve the row and column count of the HTML table use the below built-in functions.

            getHTMLTableRowCount()-->to get the table row count
            getHTMLTableColumnCount()-->to get the table column count.

        Note: Above functions can be inserted while recording.

Map File :

1. How to change the ID given by the QEngine for my HTML
button to an easily rememberable value?

       The ID provided by QEngine in the script is to link the appropriate element property stored in the GUI Map file.

       Example:
             setText("username","John",2)
             In the above "username" is the ID used by QEngine to retrieve the element properties of the text field stored in the GUI Map file. Sometimes the ID generated may not have meaningful representation of the field over which it is operating. Hence, if you wish to change the ID , then that needs to be changed in Map file and in the appropriate script line.

        Follow the below instruction to modify the ID in QEngine,
    1. Right click over the appropriate script and open the map file by clicking on "Edit Script Map" menu.
    2. This will open the "GUI Map File Editor" window..
    3. Choose the element whose ID needs to be changed from the tree.
    4. The element properties will be shown in the right side window where ID will be in non editable textfield. Next to it there will be "Edit" Icon to allow editing of ID.
    5. Click on the Edit Icon and edit the ID to meaningful name.
    6. Then Click on "Update" to save the changes in the GUI Map File.
    7. In the script modify the changed ID in the appropriate script line.
       You can change the ID in the Global Map file also.

        Note: Make sure the changes made in the GUI Map file is reflected in the script also. Otherwise the particular script line will fail during playback.

Settings :

1. How to change the maximum wait time for the page to load completely under settings ?

       To  change the maximum wait time follow the below steps,
    1. Go to the 'Settings' option through link present in the suite tree.
    2. Choose "Replay Settings" and configure the value for "Maximum Wait time" as desired.
    3. Apply the changes and save the settings.
2.Does QEngine allow playback to ignore waittime recorded in the script ?

        QEngine does allow the playback to ignore waittime recorded in the script function. Follow the below steps to configure the same,
    1. Go to Settings->Replay Settings.
    2. Choose "Fast - Run as fast as possible" under Replay Speed
    3. Save the settings.
        This settings will take care of ignoring waittime recorded in the script.

3.  How to playback the script recorded with the application running in one server host against another server host ?


            To playback to script against different host use "Host-Port Settings" present under Suite settings. This will allow to configure the changed host and port details to play the script against different server host. Follow the below steps to configure the Host-Port settings,
    1. Click on the "Settings" link present in the Suite tree and select "Host Port Settings" tab in the settings page.
    2. Now check the checkbox for "Use Host Port" configuration and click on the "Host-Port Editor" link.
    3. In the "Host Port Configuration" screen, create new or use the default property file for configuring the change host and port details.
    4. The Property file will parse all the scripts in the suite and list all the host / port / protocol of the old server with empty field for configuring new changed host / port details.
    5. Configure the changed host / port details appropriately.
    6. Click on "Apply" to save the changes in a property file.
    7. From the settings window select configuration to use from the combo box and click on the "Apply" button of the settings page to save the settings.
          This will change the host and port appropriately to play the script against the different server host.

4. How to close an unexpected popup window arise during playback ?
   
          Unexpected popup is a alert type window pop's up only during playback session which doesn't came while recording. Hence the script may not contain the steps to close those window. To handle such scenario we can configure to close the unexpected popup in the settings.

          In the settings, configure Exception handling -> Popup Exceptions  and choose "Close & Continue Play" option to close the unexpected popup automatically.

5. Does QEngine scripts created for one language can be replayed against other language ?

          QEngine does have the support to playback the script created against one language against other language.
          Do the following configuration to achieve the above,
    1. Go to Settings. Select locale settings.
    2. Select the language in which you want to playback the script with the corresponding country.
    3. Click on 'I18N Editor' link present on the right hand side. It opens the locale configuration window. Provide the equavalent words (in the selected language) for the listed key words inside the editor.
    4. Save the settings and playback the script.

 

 AdventNet, Inc. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers | Tell Us