feat: re-add listSelector empty check for child selection

This commit is contained in:
amhsirak
2024-12-15 05:13:08 +05:30
parent ddb880df66
commit 97e7c89105

View File

@@ -20,7 +20,7 @@ export const getElementInformation = async (
getList: boolean
) => {
try {
if (!getList) {
if (!getList || (getList && listSelector !== '')) {
const elementInfo = await page.evaluate(
async ({ x, y }) => {
const el = document.elementFromPoint(x, y) as HTMLElement;
@@ -158,7 +158,7 @@ export const getElementInformation = async (
*/
export const getRect = async (page: Page, coordinates: Coordinates, listSelector: string, getList: boolean) => {
try {
if (!getList) {
if (!getList || (getList && listSelector !== '')) {
const rect = await page.evaluate(
async ({ x, y }) => {
const el = document.elementFromPoint(x, y) as HTMLElement;