Forum Discussion

Udayreddy_90's avatar
Udayreddy_90
Contributor
12 years ago

Object Identification: with level of authorities.

This is savior problem in my work environment, I need support for this.



In application, level of authorization is Admin and Employee

 When admin logged in the application, he may see the modules as shown in fig one.

 When employee logged in to the application, he may see the modules as shown in fig EmTwo.



My scenario is like this..........

  Employee logged in to the application and make some changes in the Employee info module form of his record and then log out from the form, Then Admin logged in to the application to check the effect of that particular employee.



Here problem is

  when employee logged in to the application, employee Info module is recognized as first cell of the table.( sys- iexplore-page -Table-cell(0,0)-link )

  when admin logged in to the application, employee Info module is recognized as 8th cell in the table.(sys -iexplore-page-table-cell(0,7)-link)

I used same name mapping for this in my test.( because this one scenario )

Q: Is there any way to use only sys - iexplore - page and employee Info link for uniquely recogize the employee Info link in both Admin and Employee level of authorization?

Is there a way to use the same Name mapping  to overcome this problem.

4 Replies

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)
    Uday,



    Is there any way to use only sys - iexplore - page and employee Info link for uniquely recogize the employee Info link in both Admin and Employee level of authorization?
    Yes, it's possible. By default, TestComplete uses row and column indexes to map table cells. Try mapping the cell by its text (by the contentText property), not by the indexes:

    * Open your tested web page (in either Admin or User mode) in a browser.

    * Open the Name Mapping editor.

    * In the editor, select the mapping item that corresponds to the cell.

    * Click Edit on the toolbar of the Name Mapping editor. This will invoke the Edit Name Mapping Item dialog.

    * In the dialog, remove the RowIndex and ColumnIndex properties from the mapping condition and include the contentText property into the condition (this property returns the cell's text).

    * Save the changes.
  • vibe's avatar
    vibe
    Occasional Contributor
    Hi Alex,



    I'm using TC8 and can't find contentText property.

    See attach

    Thx

  • vibe's avatar
    vibe
    Occasional Contributor
    Hi Alex,



    I'm using TC8 and can't find contentText property.

    See attach

    Thx

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Hi Vitaliy,


    This property has been introduced in TestComplete 9.