Repeatedly clicks a button until no new content appears or max clicks reached.This function handles “Load More” pagination patterns by clicking a button repeatedly
until one of these conditions is met:
The button becomes invisible or disabled
No new content is loaded (when container_locator is provided)
Maximum number of clicks is reached
The function automatically waits between clicks and handles network settling after each click.
Optional content container used to detect changes. When provided, the function monitors the container’s child count to determine if new content was loaded. Defaults to None.