We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG]: page.getAttribute returns None
Actual:

```py
import asyncio
from playwright_web import chromium


async def run():
    browser = await chromium.launch(headless=False)
    context = await browser.newContext(viewport=0)  # 0 stands for no viewport
    page = await context.newPage()

    await page.setContent(""""
    <input id="kekstar"/>
    """)

    await page.fill("#kekstar", "Foobar")

    print(await page.getAttribute("#kekstar", 'value'))

    await browser.close()


asyncio.get_event_loop().run_until_complete(run())

```

Expected: Returns Foobar

On Try Playwright, it works: https://try.playwright.tech/?s=dzmwi

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `playwright_web/frame.py`
Content:
```
1 # Copyright (c) Microsoft Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import asyncio
16 from playwright_web.connection import Channel, ChannelOwner, ConnectionScope, from_channel, from_nullable_channel
17 from playwright_web.element_handle import ElementHandle, convertSelectOptionValues, ValuesToSelect
18 from playwright_web.helper import ConsoleMessageLocation, FilePayload, SelectOption, is_function_body, locals_to_params
19 from playwright_web.js_handle import JSHandle, parse_result, serialize_argument
20 from playwright_web.network import Request, Response, Route
21 from typing import Any, Awaitable, Dict, List, Optional, Union
22 
23 class Frame(ChannelOwner):
24 
25   def __init__(self, scope: ConnectionScope, guid: str, initializer: Dict) -> None:
26     super().__init__(scope, guid, initializer)
27     self._parent_frame = from_nullable_channel(initializer['parentFrame'])
28     if self._parent_frame:
29       self._parent_frame._child_frames.append(self)
30     self._name = initializer['name']
31     self._url = initializer['url']
32     self._detached = False
33     self._child_frames: List[Frame] = list()
34     self._page: Optional['Page']
35 
36   async def goto(self,
37       url: str,
38       timeout: int = None,
39       waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,
40       referer: str = None) -> Optional[Response]:
41     return from_nullable_channel(await self._channel.send('goto', locals_to_params(locals())))
42 
43   async def waitForNavigation(self,
44       timeout: int = None,
45       waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,
46       url: str = None # TODO: add url, callback
47     ) -> Optional[Response]:
48     return from_nullable_channel(await self._channel.send('waitForNavigation', locals_to_params(locals())))
49 
50   async def waitForLoadState(self,
51       state: str = 'load',
52       timeout: int = None) -> None:
53     await self._channel.send('waitForLoadState', locals_to_params(locals()))
54 
55   async def frameElement(self) -> ElementHandle:
56     return from_channel(await self._channel.send('frameElement'))
57 
58   async def evaluate(self, expression: str, arg: Any = None, force_expr: bool = False) -> Any:
59     if not is_function_body(expression):
60       force_expr = True
61     return parse_result(await self._channel.send('evaluateExpression', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))
62 
63   async def evaluateHandle(self, expression: str, arg: Any = None, force_expr: bool = False) -> JSHandle:
64     if not is_function_body(expression):
65       force_expr = True
66     return from_channel(await self._channel.send('evaluateExpressionHandle', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))
67 
68   async def querySelector(self, selector: str) -> Optional[ElementHandle]:
69     return from_nullable_channel(await self._channel.send('querySelector', dict(selector=selector)))
70 
71   async def waitForSelector(self,
72       selector: str,
73       timeout: int = None,
74       state: str = None, # Literal['attached', 'detached', 'visible', 'hidden'] = None
75     ) -> Optional[ElementHandle]:
76     return from_nullable_channel(await self._channel.send('waitForSelector', locals_to_params(locals())))
77 
78   async def dispatchEvent(self,
79       selector: str,
80       type: str,
81       eventInit: Dict = None,
82       timeout: int = None) -> None:
83     await self._channel.send('dispatchEvent', dict(selector=selector, type=type, eventInit=eventInit))
84 
85   async def evalOnSelector(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:
86     return parse_result(await self._channel.send('evalOnSelector', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))
87 
88   async def evalOnSelectorAll(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:
89     return parse_result(await self._channel.send('evalOnSelectorAll', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))
90 
91   async def content(self) -> str:
92     return await self._channel.send('content')
93 
94   async def setContent(self,
95       html: str, timeout: int = None,
96       waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None
97     ) -> None:
98     await self._channel.send('setContent', locals_to_params(locals()))
99 
100   @property
101   def name(self) -> str:
102     return self._name or ''
103 
104   @property
105   def url(self) -> str:
106     return self._url or ''
107 
108   @property
109   def parentFrame(self) -> Optional['Frame']:
110     return self._parent_frame
111 
112   @property
113   def childFrames(self) -> List['Frame']:
114     return self._child_frames.copy()
115 
116   def isDetached(self) -> bool:
117     return self._detached
118 
119   async def addScriptTag(self,
120       url: str = None,
121       path: str = None,
122       content: str = None) -> ElementHandle:
123     return from_channel(await self._channel.send('addScriptTag', locals_to_params(locals())))
124 
125   async def addStyleTag(self,
126       url: str = None,
127       path: str = None,
128       content: str = None) -> ElementHandle:
129     return from_channel(await self._channel.send('addStyleTag', locals_to_params(locals())))
130 
131   async def click(self,
132       selector: str,
133       modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,
134       position: Dict = None,
135       delay: int = None,
136       button: str = None, # Literal['left', 'right', 'middle'] = None,
137       clickCount: int = None,
138       timeout: int = None,
139       force: bool = None,
140       noWaitAfter: bool = None) -> None:
141     await self._channel.send('click', locals_to_params(locals()))
142 
143   async def dblclick(self,
144       selector: str,
145       modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,
146       position: Dict = None,
147       delay: int = None,
148       button: str = None, # Literal['left', 'right', 'middle'] = None,
149       timeout: int = None,
150       force: bool = None) -> None:
151     await self._channel.send('dblclick', locals_to_params(locals()))
152 
153   async def fill(self,
154       selector: str,
155       value: str,
156       timeout: int = None,
157       noWaitAfter: bool = None) -> None:
158     await self._channel.send('fill', locals_to_params(locals()))
159 
160   async def focus(self,
161       selector: str,
162       timeout: int = None) -> None:
163     await self._channel.send('focus', locals_to_params(locals()))
164 
165   async def textContent(self,
166       selector: str,
167       timeout: int = None) -> str:
168     return await self._channel.send('textContent', locals_to_params(locals()))
169 
170   async def innerText(self,
171       selector: str,
172       timeout: int = None) -> str:
173     return await self._channel.send('innerText', locals_to_params(locals()))
174 
175   async def innerHTML(self,
176       selector: str,
177       timeout: int = None) -> str:
178     return await self._channel.send('innerHTML', locals_to_params(locals()))
179 
180   async def getAttribute(self,
181       selector: str,
182       name: str,
183       timeout: int = None) -> str:
184     await self._channel.send('getAttribute', locals_to_params(locals()))
185 
186   async def hover(self,
187       selector: str,
188       modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,
189       position: Dict = None,
190       timeout: int = None,
191       force: bool = None) -> None:
192     await self._channel.send('hover', locals_to_params(locals()))
193 
194   async def selectOption(self,
195       selector: str,
196       values: ValuesToSelect,
197       timeout: int = None,
198       noWaitAfter: bool = None) -> None:
199     await self._channel.send('selectOption', dict(selector=selector, values=convertSelectOptionValues(values), timeout=timeout, noWaitAfter=noWaitAfter))
200 
201   async def setInputFiles(self,
202       selector: str,
203       files: Union[str, FilePayload, List[str], List[FilePayload]],
204       timeout: int = None,
205       noWaitAfter: bool = None) -> None:
206     await self._channel.send('setInputFiles', locals_to_params(locals()))
207 
208   async def type(self,
209       selector: str,
210       text: str,
211       delay: int = None,
212       timeout: int = None,
213       noWaitAfter: bool = None) -> None:
214     await self._channel.send('type', locals_to_params(locals()))
215 
216   async def press(self,
217       selector: str,
218       key: str,
219       delay: int = None,
220       timeout: int = None,
221       noWaitAfter: bool = None) -> None:
222     await self._channel.send('press', locals_to_params(locals()))
223 
224   async def check(self,
225       selector: str,
226       timeout: int = None,
227       force: bool = None,
228       noWaitAfter: bool = None) -> None:
229     await self._channel.send('check', locals_to_params(locals()))
230 
231   async def uncheck(self,
232       selector: str,
233       timeout: int = None,
234       force: bool = None,
235       noWaitAfter: bool = None) -> None:
236     await self._channel.send('uncheck', locals_to_params(locals()))
237 
238   async def waitForTimeout(self, timeout: int) -> Awaitable[None]:
239     return self._scope._loop.create_task(asyncio.sleep(timeout / 1000))
240 
241   async def waitForFunction(self,
242       expression: str,
243       arg: Any = None,
244       force_expr: bool = False,
245       timeout: int = None,
246       polling: Union[int, str] = None # Union[int, Literal["raf"]]
247       ) -> JSHandle:
248     if not is_function_body(expression):
249       force_expr = True
250     params = locals_to_params(locals())
251     params['isFunction'] = not(force_expr)
252     params['arg'] = serialize_argument(arg)
253     return from_channel(await self._channel.send('waitForFunction', params))
254 
255   async def title(self) -> str:
256     return await self._channel.send('title')
257
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/playwright_web/frame.py b/playwright_web/frame.py
--- a/playwright_web/frame.py
+++ b/playwright_web/frame.py
@@ -181,7 +181,7 @@
       selector: str,
       name: str,
       timeout: int = None) -> str:
-    await self._channel.send('getAttribute', locals_to_params(locals()))
+    return await self._channel.send('getAttribute', locals_to_params(locals()))
 
   async def hover(self,
       selector: str,

{"golden_diff": "diff --git a/playwright_web/frame.py b/playwright_web/frame.py\n--- a/playwright_web/frame.py\n+++ b/playwright_web/frame.py\n@@ -181,7 +181,7 @@\n       selector: str,\n       name: str,\n       timeout: int = None) -> str:\n-    await self._channel.send('getAttribute', locals_to_params(locals()))\n+    return await self._channel.send('getAttribute', locals_to_params(locals()))\n \n   async def hover(self,\n       selector: str,\n", "issue": "[BUG]: page.getAttribute returns None\nActual:\r\n\r\n```py\r\nimport asyncio\r\nfrom playwright_web import chromium\r\n\r\n\r\nasync def run():\r\n    browser = await chromium.launch(headless=False)\r\n    context = await browser.newContext(viewport=0)  # 0 stands for no viewport\r\n    page = await context.newPage()\r\n\r\n    await page.setContent(\"\"\"\"\r\n    <input id=\"kekstar\"/>\r\n    \"\"\")\r\n\r\n    await page.fill(\"#kekstar\", \"Foobar\")\r\n\r\n    print(await page.getAttribute(\"#kekstar\", 'value'))\r\n\r\n    await browser.close()\r\n\r\n\r\nasyncio.get_event_loop().run_until_complete(run())\r\n\r\n```\r\n\r\nExpected: Returns Foobar\r\n\r\nOn Try Playwright, it works: https://try.playwright.tech/?s=dzmwi\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport asyncio\nfrom playwright_web.connection import Channel, ChannelOwner, ConnectionScope, from_channel, from_nullable_channel\nfrom playwright_web.element_handle import ElementHandle, convertSelectOptionValues, ValuesToSelect\nfrom playwright_web.helper import ConsoleMessageLocation, FilePayload, SelectOption, is_function_body, locals_to_params\nfrom playwright_web.js_handle import JSHandle, parse_result, serialize_argument\nfrom playwright_web.network import Request, Response, Route\nfrom typing import Any, Awaitable, Dict, List, Optional, Union\n\nclass Frame(ChannelOwner):\n\n  def __init__(self, scope: ConnectionScope, guid: str, initializer: Dict) -> None:\n    super().__init__(scope, guid, initializer)\n    self._parent_frame = from_nullable_channel(initializer['parentFrame'])\n    if self._parent_frame:\n      self._parent_frame._child_frames.append(self)\n    self._name = initializer['name']\n    self._url = initializer['url']\n    self._detached = False\n    self._child_frames: List[Frame] = list()\n    self._page: Optional['Page']\n\n  async def goto(self,\n      url: str,\n      timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,\n      referer: str = None) -> Optional[Response]:\n    return from_nullable_channel(await self._channel.send('goto', locals_to_params(locals())))\n\n  async def waitForNavigation(self,\n      timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,\n      url: str = None # TODO: add url, callback\n    ) -> Optional[Response]:\n    return from_nullable_channel(await self._channel.send('waitForNavigation', locals_to_params(locals())))\n\n  async def waitForLoadState(self,\n      state: str = 'load',\n      timeout: int = None) -> None:\n    await self._channel.send('waitForLoadState', locals_to_params(locals()))\n\n  async def frameElement(self) -> ElementHandle:\n    return from_channel(await self._channel.send('frameElement'))\n\n  async def evaluate(self, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    if not is_function_body(expression):\n      force_expr = True\n    return parse_result(await self._channel.send('evaluateExpression', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def evaluateHandle(self, expression: str, arg: Any = None, force_expr: bool = False) -> JSHandle:\n    if not is_function_body(expression):\n      force_expr = True\n    return from_channel(await self._channel.send('evaluateExpressionHandle', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def querySelector(self, selector: str) -> Optional[ElementHandle]:\n    return from_nullable_channel(await self._channel.send('querySelector', dict(selector=selector)))\n\n  async def waitForSelector(self,\n      selector: str,\n      timeout: int = None,\n      state: str = None, # Literal['attached', 'detached', 'visible', 'hidden'] = None\n    ) -> Optional[ElementHandle]:\n    return from_nullable_channel(await self._channel.send('waitForSelector', locals_to_params(locals())))\n\n  async def dispatchEvent(self,\n      selector: str,\n      type: str,\n      eventInit: Dict = None,\n      timeout: int = None) -> None:\n    await self._channel.send('dispatchEvent', dict(selector=selector, type=type, eventInit=eventInit))\n\n  async def evalOnSelector(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    return parse_result(await self._channel.send('evalOnSelector', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def evalOnSelectorAll(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    return parse_result(await self._channel.send('evalOnSelectorAll', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def content(self) -> str:\n    return await self._channel.send('content')\n\n  async def setContent(self,\n      html: str, timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None\n    ) -> None:\n    await self._channel.send('setContent', locals_to_params(locals()))\n\n  @property\n  def name(self) -> str:\n    return self._name or ''\n\n  @property\n  def url(self) -> str:\n    return self._url or ''\n\n  @property\n  def parentFrame(self) -> Optional['Frame']:\n    return self._parent_frame\n\n  @property\n  def childFrames(self) -> List['Frame']:\n    return self._child_frames.copy()\n\n  def isDetached(self) -> bool:\n    return self._detached\n\n  async def addScriptTag(self,\n      url: str = None,\n      path: str = None,\n      content: str = None) -> ElementHandle:\n    return from_channel(await self._channel.send('addScriptTag', locals_to_params(locals())))\n\n  async def addStyleTag(self,\n      url: str = None,\n      path: str = None,\n      content: str = None) -> ElementHandle:\n    return from_channel(await self._channel.send('addStyleTag', locals_to_params(locals())))\n\n  async def click(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      delay: int = None,\n      button: str = None, # Literal['left', 'right', 'middle'] = None,\n      clickCount: int = None,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('click', locals_to_params(locals()))\n\n  async def dblclick(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      delay: int = None,\n      button: str = None, # Literal['left', 'right', 'middle'] = None,\n      timeout: int = None,\n      force: bool = None) -> None:\n    await self._channel.send('dblclick', locals_to_params(locals()))\n\n  async def fill(self,\n      selector: str,\n      value: str,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('fill', locals_to_params(locals()))\n\n  async def focus(self,\n      selector: str,\n      timeout: int = None) -> None:\n    await self._channel.send('focus', locals_to_params(locals()))\n\n  async def textContent(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('textContent', locals_to_params(locals()))\n\n  async def innerText(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('innerText', locals_to_params(locals()))\n\n  async def innerHTML(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('innerHTML', locals_to_params(locals()))\n\n  async def getAttribute(self,\n      selector: str,\n      name: str,\n      timeout: int = None) -> str:\n    await self._channel.send('getAttribute', locals_to_params(locals()))\n\n  async def hover(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      timeout: int = None,\n      force: bool = None) -> None:\n    await self._channel.send('hover', locals_to_params(locals()))\n\n  async def selectOption(self,\n      selector: str,\n      values: ValuesToSelect,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('selectOption', dict(selector=selector, values=convertSelectOptionValues(values), timeout=timeout, noWaitAfter=noWaitAfter))\n\n  async def setInputFiles(self,\n      selector: str,\n      files: Union[str, FilePayload, List[str], List[FilePayload]],\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('setInputFiles', locals_to_params(locals()))\n\n  async def type(self,\n      selector: str,\n      text: str,\n      delay: int = None,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('type', locals_to_params(locals()))\n\n  async def press(self,\n      selector: str,\n      key: str,\n      delay: int = None,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('press', locals_to_params(locals()))\n\n  async def check(self,\n      selector: str,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('check', locals_to_params(locals()))\n\n  async def uncheck(self,\n      selector: str,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('uncheck', locals_to_params(locals()))\n\n  async def waitForTimeout(self, timeout: int) -> Awaitable[None]:\n    return self._scope._loop.create_task(asyncio.sleep(timeout / 1000))\n\n  async def waitForFunction(self,\n      expression: str,\n      arg: Any = None,\n      force_expr: bool = False,\n      timeout: int = None,\n      polling: Union[int, str] = None # Union[int, Literal[\"raf\"]]\n      ) -> JSHandle:\n    if not is_function_body(expression):\n      force_expr = True\n    params = locals_to_params(locals())\n    params['isFunction'] = not(force_expr)\n    params['arg'] = serialize_argument(arg)\n    return from_channel(await self._channel.send('waitForFunction', params))\n\n  async def title(self) -> str:\n    return await self._channel.send('title')\n", "path": "playwright_web/frame.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport asyncio\nfrom playwright_web.connection import Channel, ChannelOwner, ConnectionScope, from_channel, from_nullable_channel\nfrom playwright_web.element_handle import ElementHandle, convertSelectOptionValues, ValuesToSelect\nfrom playwright_web.helper import ConsoleMessageLocation, FilePayload, SelectOption, is_function_body, locals_to_params\nfrom playwright_web.js_handle import JSHandle, parse_result, serialize_argument\nfrom playwright_web.network import Request, Response, Route\nfrom typing import Any, Awaitable, Dict, List, Optional, Union\n\nclass Frame(ChannelOwner):\n\n  def __init__(self, scope: ConnectionScope, guid: str, initializer: Dict) -> None:\n    super().__init__(scope, guid, initializer)\n    self._parent_frame = from_nullable_channel(initializer['parentFrame'])\n    if self._parent_frame:\n      self._parent_frame._child_frames.append(self)\n    self._name = initializer['name']\n    self._url = initializer['url']\n    self._detached = False\n    self._child_frames: List[Frame] = list()\n    self._page: Optional['Page']\n\n  async def goto(self,\n      url: str,\n      timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,\n      referer: str = None) -> Optional[Response]:\n    return from_nullable_channel(await self._channel.send('goto', locals_to_params(locals())))\n\n  async def waitForNavigation(self,\n      timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None,\n      url: str = None # TODO: add url, callback\n    ) -> Optional[Response]:\n    return from_nullable_channel(await self._channel.send('waitForNavigation', locals_to_params(locals())))\n\n  async def waitForLoadState(self,\n      state: str = 'load',\n      timeout: int = None) -> None:\n    await self._channel.send('waitForLoadState', locals_to_params(locals()))\n\n  async def frameElement(self) -> ElementHandle:\n    return from_channel(await self._channel.send('frameElement'))\n\n  async def evaluate(self, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    if not is_function_body(expression):\n      force_expr = True\n    return parse_result(await self._channel.send('evaluateExpression', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def evaluateHandle(self, expression: str, arg: Any = None, force_expr: bool = False) -> JSHandle:\n    if not is_function_body(expression):\n      force_expr = True\n    return from_channel(await self._channel.send('evaluateExpressionHandle', dict(expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def querySelector(self, selector: str) -> Optional[ElementHandle]:\n    return from_nullable_channel(await self._channel.send('querySelector', dict(selector=selector)))\n\n  async def waitForSelector(self,\n      selector: str,\n      timeout: int = None,\n      state: str = None, # Literal['attached', 'detached', 'visible', 'hidden'] = None\n    ) -> Optional[ElementHandle]:\n    return from_nullable_channel(await self._channel.send('waitForSelector', locals_to_params(locals())))\n\n  async def dispatchEvent(self,\n      selector: str,\n      type: str,\n      eventInit: Dict = None,\n      timeout: int = None) -> None:\n    await self._channel.send('dispatchEvent', dict(selector=selector, type=type, eventInit=eventInit))\n\n  async def evalOnSelector(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    return parse_result(await self._channel.send('evalOnSelector', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def evalOnSelectorAll(self, selector: str, expression: str, arg: Any = None, force_expr: bool = False) -> Any:\n    return parse_result(await self._channel.send('evalOnSelectorAll', dict(selector=selector, expression=expression, isFunction=not(force_expr), arg=serialize_argument(arg))))\n\n  async def content(self) -> str:\n    return await self._channel.send('content')\n\n  async def setContent(self,\n      html: str, timeout: int = None,\n      waitUntil: str = None, # Literal['load', 'domcontentloaded', 'networkidle'] = None\n    ) -> None:\n    await self._channel.send('setContent', locals_to_params(locals()))\n\n  @property\n  def name(self) -> str:\n    return self._name or ''\n\n  @property\n  def url(self) -> str:\n    return self._url or ''\n\n  @property\n  def parentFrame(self) -> Optional['Frame']:\n    return self._parent_frame\n\n  @property\n  def childFrames(self) -> List['Frame']:\n    return self._child_frames.copy()\n\n  def isDetached(self) -> bool:\n    return self._detached\n\n  async def addScriptTag(self,\n      url: str = None,\n      path: str = None,\n      content: str = None) -> ElementHandle:\n    return from_channel(await self._channel.send('addScriptTag', locals_to_params(locals())))\n\n  async def addStyleTag(self,\n      url: str = None,\n      path: str = None,\n      content: str = None) -> ElementHandle:\n    return from_channel(await self._channel.send('addStyleTag', locals_to_params(locals())))\n\n  async def click(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      delay: int = None,\n      button: str = None, # Literal['left', 'right', 'middle'] = None,\n      clickCount: int = None,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('click', locals_to_params(locals()))\n\n  async def dblclick(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      delay: int = None,\n      button: str = None, # Literal['left', 'right', 'middle'] = None,\n      timeout: int = None,\n      force: bool = None) -> None:\n    await self._channel.send('dblclick', locals_to_params(locals()))\n\n  async def fill(self,\n      selector: str,\n      value: str,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('fill', locals_to_params(locals()))\n\n  async def focus(self,\n      selector: str,\n      timeout: int = None) -> None:\n    await self._channel.send('focus', locals_to_params(locals()))\n\n  async def textContent(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('textContent', locals_to_params(locals()))\n\n  async def innerText(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('innerText', locals_to_params(locals()))\n\n  async def innerHTML(self,\n      selector: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('innerHTML', locals_to_params(locals()))\n\n  async def getAttribute(self,\n      selector: str,\n      name: str,\n      timeout: int = None) -> str:\n    return await self._channel.send('getAttribute', locals_to_params(locals()))\n\n  async def hover(self,\n      selector: str,\n      modifiers: List[str] = None, # Literal['Alt', 'Control', 'Meta', 'Shift']] = None,\n      position: Dict = None,\n      timeout: int = None,\n      force: bool = None) -> None:\n    await self._channel.send('hover', locals_to_params(locals()))\n\n  async def selectOption(self,\n      selector: str,\n      values: ValuesToSelect,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('selectOption', dict(selector=selector, values=convertSelectOptionValues(values), timeout=timeout, noWaitAfter=noWaitAfter))\n\n  async def setInputFiles(self,\n      selector: str,\n      files: Union[str, FilePayload, List[str], List[FilePayload]],\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('setInputFiles', locals_to_params(locals()))\n\n  async def type(self,\n      selector: str,\n      text: str,\n      delay: int = None,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('type', locals_to_params(locals()))\n\n  async def press(self,\n      selector: str,\n      key: str,\n      delay: int = None,\n      timeout: int = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('press', locals_to_params(locals()))\n\n  async def check(self,\n      selector: str,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('check', locals_to_params(locals()))\n\n  async def uncheck(self,\n      selector: str,\n      timeout: int = None,\n      force: bool = None,\n      noWaitAfter: bool = None) -> None:\n    await self._channel.send('uncheck', locals_to_params(locals()))\n\n  async def waitForTimeout(self, timeout: int) -> Awaitable[None]:\n    return self._scope._loop.create_task(asyncio.sleep(timeout / 1000))\n\n  async def waitForFunction(self,\n      expression: str,\n      arg: Any = None,\n      force_expr: bool = False,\n      timeout: int = None,\n      polling: Union[int, str] = None # Union[int, Literal[\"raf\"]]\n      ) -> JSHandle:\n    if not is_function_body(expression):\n      force_expr = True\n    params = locals_to_params(locals())\n    params['isFunction'] = not(force_expr)\n    params['arg'] = serialize_argument(arg)\n    return from_channel(await self._channel.send('waitForFunction', params))\n\n  async def title(self) -> str:\n    return await self._channel.send('title')\n", "path": "playwright_web/frame.py"}]}