Need help in Drag and Drop Element
My concern here is to move the employee under Holding Area(right side of the page) to one of the 9 boxes either directly or by double clicking the desired Box (for say: Emerging Star) present on its left. I tried with the following xpaths, Subject 7 was showing Drag_And_Drop command as passed but it was not performed on the application.
Xpaths Used:
- Drag Element - //*[name()='text' and text()='@Person_Name'] Eg: @Person_Name - Parenteau, Judi
- Drop Element - (//*[name()='g' and contains(@aria-label,"@9Box_Name")]//*[name()='rect'])[1] Eg: @9Box_Name - Emerging Star
Reference:
User_ID: vdevraj
Test_Case: UT_HCM_SUP_NonReportingEmployee_In_HoldingArea_Moved_to_9Box
Data_Sets to be used: UT_HCM_SUP_NonReportingEmployee_In_HoldingArea and HCM_S7_TalentAdmin
Hi Vikas,
Apologies for the delay in response to your request. We found a solution for this to work as follows:
* Download “advanced-dnd-1.0.0-SNAPSHOT.jar“ and upload to the platform to create a code snippet and use “Execute_Java“ command instead of “Drag_And_Drop“ (“Drag_And_Drop HALT Talent_Review.text.HoldingArea_Person Talent_Review.label.9Bo"_Name NATIVE“) command.
Steps:
1. Create a code snippet with the following parameters:
a. Name: “AdvancedDnD
“ or something else;
b. Class: “com.subject7.helper.AdvancedDnD
“;
c. Dependencies: “advanced-dnd-1.0.0-SNAPSHOT.jar
“;
2. Create “Execute_Java
“ command with the following parameters:
a. Snippet: “<name_of_code_snippet
>” - in the current case it is “AdvancedDnD
“;
b. Method: “execute
”;
c. Used drivers: “Web Driver
“;
3. Replace the “Drag_And_Drop HALT Talent_Review.text.HoldingArea_Person Talent_Review.label.9Box_Name NATIVE
“ command to the created above “Execute_Java“ command;
4. Create a “Set_Var
“ command with the following parameters and use it for a test case:
a. Variable: “advancedDndDragElementXPath
”;
b. Value: “//*[name()='text' and text()='@Person_Name']
“;
5. Create a “Set_Var
“ command with the following parameters and use it for the test case:
a. Variable: “advancedDndDropElementXPath
”;
b. Value: “(//[name()='g' and contains(@aria-label,"@9Box_Name")]//[name()='rect'])[1]
“;
Regards,
Subject7 Team
Please sign in to leave a comment.