Skip to content

Error handling of disconnected browser #11

Open
@moaoci

Description

@moaoci

The error ( halt to the STOP instruction ) occurs when the browser is manually disconnected while the user macros are running. Might also happen if www site returns a time out.

Mine occurs in AutomateBrowser.querySelectorAll, (other functions might be also be affected.)

ErrHandler:
Debug.Print "AutomateBrowser.querySelectorAll - " & Err.description
Stop
Resume
End Function

The RESUME after the STOP will rapidly bring back to the STOP and on and on.

The documentation says «' Note: resulting Dictionary will be empty (0 items) if an error or no matching elements found»

Changing RESUME to RESUME NEXT seems to work, returning 0 items as stated.

After returning 0 items, is there a way to verify if browser is unavailable or if querySelectorAll simply did not find anything ? If so, the STOP could also be removed.

I am not at ease with the whole AutomateBrowser module. Other ErrHandler: simply stop before end function, no resume. Can someone verify ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions