diff --git a/py/selenium/webdriver/common/bidi/common.py b/py/selenium/webdriver/common/bidi/common.py index a56ba2e5a9894..4cfe7f8fbc16e 100644 --- a/py/selenium/webdriver/common/bidi/common.py +++ b/py/selenium/webdriver/common/bidi/common.py @@ -14,9 +14,10 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from typing import Generator, Optional -def command_builder(method: str, params: dict = None) -> dict: +def command_builder(method: str, params: Optional[dict] = None) -> Generator[dict, dict, dict]: """Build a command iterator to send to the BiDi protocol. Parameters: