MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / enable_mobile

Method enable_mobile

py/selenium/webdriver/common/options.py:351–370  ·  view source on GitHub ↗

Enables mobile browser use for browsers that support it. Args: android_package: The name of the android package to start android_activity: The name of the android activity device_serial: The device serial number

(
        self,
        android_package: str | None = None,
        android_activity: str | None = None,
        device_serial: str | None = None,
    )

Source from the content-addressed store, hash-verified

349 self._caps[name] = value
350
351 def enable_mobile(
352 self,
353 android_package: str | None = None,
354 android_activity: str | None = None,
355 device_serial: str | None = None,
356 ) -> None:
357 """Enables mobile browser use for browsers that support it.
358
359 Args:
360 android_package: The name of the android package to start
361 android_activity: The name of the android activity
362 device_serial: The device serial number
363 """
364 if not android_package:
365 raise AttributeError("android_package must be passed in")
366 self.mobile_options = {"androidPackage": android_package}
367 if android_activity:
368 self.mobile_options["androidActivity"] = android_activity
369 if device_serial:
370 self.mobile_options["androidDeviceSerial"] = device_serial
371
372 @abstractmethod
373 def to_capabilities(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected