/
CommandRunnerInterface.php
39 lines (29 loc) · 1.3 KB
/
CommandRunnerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Tienvx\Bundle\MbtBundle\Command;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Tienvx\Bundle\MbtBundle\Model\Model\Revision\CommandInterface;
use Tienvx\Bundle\MbtBundle\Model\ValuesInterface;
interface CommandRunnerInterface
{
public const MECHANISM_ID = 'id';
public const MECHANISM_NAME = 'name';
public const MECHANISM_LINK_TEXT = 'linkText';
public const MECHANISM_PARTIAL_LINK_TEXT = 'partialLinkText';
public const MECHANISM_XPATH = 'xpath';
public const MECHANISM_CSS = 'css';
public const MECHANISMS = [
CommandRunnerInterface::MECHANISM_ID,
CommandRunnerInterface::MECHANISM_NAME,
CommandRunnerInterface::MECHANISM_LINK_TEXT,
CommandRunnerInterface::MECHANISM_PARTIAL_LINK_TEXT,
CommandRunnerInterface::MECHANISM_XPATH,
CommandRunnerInterface::MECHANISM_CSS,
];
public const TAG = 'mbt_bundle.command_runner';
public function getAllCommands(): array;
public function getCommandsRequireTarget(): array;
public function getCommandsRequireValue(): array;
public function validateTarget(CommandInterface $command): bool;
public function supports(CommandInterface $command): bool;
public function run(CommandInterface $command, ValuesInterface $values, RemoteWebDriver $driver): void;
}