Set the Command class to the OS-specific version.
(target_os, device)
| 430 | |
| 431 | # Deprecated : use context.os_context |
| 432 | def setup(target_os, device): |
| 433 | """Set the Command class to the OS-specific version.""" |
| 434 | global Command |
| 435 | if target_os == 'android': |
| 436 | AndroidCommand.driver = Driver.instance(device) |
| 437 | Command = AndroidCommand |
| 438 | elif target_os == 'ios': |
| 439 | Command = IOSCommand |
| 440 | elif target_os == 'windows': |
| 441 | Command = WindowsCommand |
| 442 | else: |
| 443 | Command = PosixCommand |
| 444 | |
| 445 | |
| 446 | # Deprecated : use context.os_context |