Skip to content

Commit 1a94b6c

Browse files
committed
Fix clear text for macbook.
1 parent 180e151 commit 1a94b6c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def multiply_numbers(x: float, y: float) -> dict:
4242
"""Multiplies two numbers."""
43-
return {"result": x + y}
43+
return {"result": x * y}
4444

4545

4646
class BrowserAgent:

computers/playwright/playwright.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414
import termcolor
1515
import time
16+
import sys
1617
from ..computer import (
1718
Computer,
1819
EnvState,
@@ -152,7 +153,10 @@ def type_text_at(
152153
self._page.wait_for_load_state()
153154

154155
if clear_before_typing:
155-
self.key_combination(["Control", "A"])
156+
if sys.platform == "darwin":
157+
self.key_combination(["Command", "A"])
158+
else:
159+
self.key_combination(["Control", "A"])
156160
self.key_combination(["Delete"])
157161

158162
self._page.keyboard.type(text)

0 commit comments

Comments
 (0)