Remove tab_handle from browser state tests

This commit is contained in:
magmueller
2024-11-22 22:59:33 +01:00
parent ef6311b22c
commit 0e2237a2ec
2 changed files with 5 additions and 9 deletions

2
.vscode/launch.json vendored
View File

@@ -72,7 +72,7 @@
"justMyCode": false
},
{
"name": "Python: Debug Current File",
"name": "pytest: Debug Current File",
"type": "python",
"request": "launch",
"module": "pytest",

View File

@@ -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]'},