Skip to content

Commit bea12da

Browse files
authored
feat: added web-first assertions (microsoft#1036)
1 parent 96f78dd commit bea12da

File tree

14 files changed

+2918
-16
lines changed

14 files changed

+2918
-16
lines changed

playwright/_impl/_api_structures.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
import sys
16-
from typing import Dict, List, Optional, Union
16+
from typing import Any, Dict, List, Optional, Union
1717

1818
if sys.version_info >= (3, 8): # pragma: no cover
1919
from typing import Literal, TypedDict
@@ -171,3 +171,27 @@ class FormField(TypedDict, total=False):
171171
name: str
172172
value: Optional[str]
173173
file: Optional[ServerFilePayload]
174+
175+
176+
class ExpectedTextValue(TypedDict, total=False):
177+
string: str
178+
regexSource: str
179+
regexFlags: str
180+
matchSubstring: bool
181+
normalizeWhiteSpace: bool
182+
183+
184+
class FrameExpectOptions(TypedDict, total=False):
185+
expressionArg: Any
186+
expectedText: Optional[List[ExpectedTextValue]]
187+
expectedNumber: Optional[int]
188+
expectedValue: Optional[Any]
189+
useInnerText: Optional[bool]
190+
isNot: bool
191+
timeout: Optional[float]
192+
193+
194+
class FrameExpectResult(TypedDict):
195+
matches: bool
196+
received: Any
197+
log: List[str]

0 commit comments

Comments
 (0)