|
48 | 48 |
|
49 | 49 | def _get_frame_locator(): |
50 | 50 | """Helper function to get current frame locator from shared variables.""" |
51 | | - frame_locator = sr.Get_Shared_Variables("playwright_frame") |
52 | | - if frame_locator in failed_tag_list: |
| 51 | + try: |
| 52 | + frame_locator = sr.Get_Shared_Variables("playwright_frame") |
| 53 | + if frame_locator in failed_tag_list: |
| 54 | + return None |
| 55 | + return frame_locator |
| 56 | + except: |
| 57 | + # Variable doesn't exist yet |
53 | 58 | return None |
54 | | - return frame_locator |
55 | 59 |
|
56 | 60 | ######################### |
57 | 61 | # # |
@@ -1977,18 +1981,18 @@ async def drag_and_drop(step_data): |
1977 | 1981 | mid_l = mid.strip().lower() |
1978 | 1982 | if "element parameter" in mid_l: |
1979 | 1983 | if mid_l.startswith("dst"): |
1980 | | - target_param = left.strip() |
| 1984 | + target_param = (left, mid, right) |
1981 | 1985 | elif mid_l.startswith("src"): |
1982 | | - source_param = left.strip() |
| 1986 | + source_param = (left, mid, right) |
1983 | 1987 |
|
1984 | 1988 | # Get source element |
1985 | | - source_locator = await PlaywrightLocator.Get_Element(source_param, current_page, frame_locator=_get_frame_locator()) |
| 1989 | + source_locator = await PlaywrightLocator.Get_Element([source_param], current_page, frame_locator=_get_frame_locator()) |
1986 | 1990 | if source_locator == "zeuz_failed": |
1987 | 1991 | CommonUtil.ExecLog(sModuleInfo, "Source element not found", 3) |
1988 | 1992 | return "zeuz_failed" |
1989 | 1993 |
|
1990 | 1994 | # Get target element |
1991 | | - target_locator = await PlaywrightLocator.Get_Element(target_param, current_page, frame_locator=_get_frame_locator()) |
| 1995 | + target_locator = await PlaywrightLocator.Get_Element([target_param], current_page, frame_locator=_get_frame_locator()) |
1992 | 1996 | if target_locator == "zeuz_failed": |
1993 | 1997 | CommonUtil.ExecLog(sModuleInfo, "Target element not found", 3) |
1994 | 1998 | return "zeuz_failed" |
|
0 commit comments