mirror of
https://github.com/browser-use/browser-use.git
synced 2025-02-18 01:18:20 +03:00
Remove tab_handle from browser state tests
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -72,7 +72,7 @@
|
||||
"justMyCode": false
|
||||
},
|
||||
{
|
||||
"name": "Python: Debug Current File",
|
||||
"name": "pytest: Debug Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "pytest",
|
||||
|
||||
@@ -19,8 +19,7 @@ def sample_browser_state():
|
||||
return BrowserState(
|
||||
url='https://example.com',
|
||||
title='Example Page',
|
||||
current_tab_handle='tab1',
|
||||
tabs=[TabInfo(handle='tab1', url='https://example.com', title='Example Page')],
|
||||
tabs=[TabInfo(url='https://example.com', title='Example Page', page_id=1)],
|
||||
screenshot='screenshot1.png',
|
||||
items=[
|
||||
DomContentItem(index=1, text='Click me', is_text_only=False, depth=0),
|
||||
@@ -78,8 +77,7 @@ def sample_history(action_registry):
|
||||
state=BrowserState(
|
||||
url='https://example.com',
|
||||
title='Page 1',
|
||||
current_tab_handle='tab1',
|
||||
tabs=[TabInfo(handle='tab1', url='https://example.com', title='Page 1')],
|
||||
tabs=[TabInfo(url='https://example.com', title='Page 1', page_id=1)],
|
||||
screenshot='screenshot1.png',
|
||||
items=[DomContentItem(index=1, text='Button', is_text_only=False, depth=0)],
|
||||
selector_map={1: '//button[1]'},
|
||||
@@ -102,8 +100,7 @@ def sample_history(action_registry):
|
||||
state=BrowserState(
|
||||
url='https://example.com/page2',
|
||||
title='Page 2',
|
||||
current_tab_handle='tab1',
|
||||
tabs=[TabInfo(handle='tab1', url='https://example.com/page2', title='Page 2')],
|
||||
tabs=[TabInfo(url='https://example.com/page2', title='Page 2', page_id=2)],
|
||||
screenshot='screenshot2.png',
|
||||
items=[DomContentItem(index=2, text='Content', is_text_only=True, depth=0)],
|
||||
selector_map={2: '//div[1]'},
|
||||
@@ -122,8 +119,7 @@ def sample_history(action_registry):
|
||||
state=BrowserState(
|
||||
url='https://example.com/page2',
|
||||
title='Page 2',
|
||||
current_tab_handle='tab1',
|
||||
tabs=[TabInfo(handle='tab1', url='https://example.com/page2', title='Page 2')],
|
||||
tabs=[TabInfo(url='https://example.com/page2', title='Page 2', page_id=2)],
|
||||
screenshot='screenshot3.png',
|
||||
items=[DomContentItem(index=3, text='Final', is_text_only=True, depth=0)],
|
||||
selector_map={3: '//div[2]'},
|
||||
|
||||
Reference in New Issue
Block a user