Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Longer wait in actor press
Magnus Müllerb36b85715dbf
diff --git a/tests/ci/test_actor_page_press.py b/tests/ci/test_actor_page_press.pyindex 6118d3fa0..450430169 100644--- a/tests/ci/test_actor_page_press.py+++ b/tests/ci/test_actor_page_press.py@@ -291,22 +291,30 @@ async def test_press_arrow_keys_game_simulation(browser_session, httpserver: HTTimport asyncio- await asyncio.sleep(0.5)+ # Wait longer for page to be fully ready+ await asyncio.sleep(1.0)# Play the game with arrow keys (like 2048)+ # Use longer delays for CI reliabilityawait page.press('ArrowLeft')- await asyncio.sleep(0.2)+ await asyncio.sleep(0.5)await page.press('ArrowUp')- await asyncio.sleep(0.2)+ await asyncio.sleep(0.5)await page.press('ArrowDown')- await asyncio.sleep(0.2)+ await asyncio.sleep(0.5)await page.press('ArrowRight')- await asyncio.sleep(0.2)+ await asyncio.sleep(0.5)# Get the score and movesscore_text = await page.evaluate('() => document.getElementById("score-value").textContent')moves_text = await page.evaluate('() => document.getElementById("moves-log").textContent')+ # Debug output+ print('DEBUG: Evaluating JavaScript: \'(() => document.getElementById("score-value").textContent)()\'')+ print(f'DEBUG: Score: {score_text}')+ print('DEBUG: Evaluating JavaScript: \'(() => document.getElementById("moves-log").textContent)()\'')+ print(f'DEBUG: Moves: {moves_text}')+# Verify the game registered all movesassert score_text == '40', f'Expected score of 40, got {score_text}'assert moves_text == 'left, up, down, right', f'Expected "left, up, down, right", got {moves_text}'