1 | <?php |
||
28 | class TextEditorPage extends FilesPage |
||
29 | { |
||
30 | protected $newTextFileButtonXpath = './/div[contains(@class, "newFileMenu")]//a[@data-templatename="New text file.txt"]'; |
||
31 | protected $newTextFileNameInputLabel = 'New text file.txt'; |
||
32 | protected $textFileEditXpath = "//textarea[contains(@class,'ace_text-input')]"; |
||
33 | |||
34 | /** |
||
35 | * create a text file with the given name. |
||
36 | * If name is not given the default is used. |
||
37 | * |
||
38 | * @param string $name |
||
39 | */ |
||
40 | public function createTextFile($name = null) |
||
41 | { |
||
42 | $this->find("xpath", $this->newFileFolderButtonXpath)->click(); |
||
43 | $this->find("xpath", $this->newTextFileButtonXpath)->click(); |
||
44 | if (strlen($name)) { |
||
45 | try { |
||
46 | $this->fillField($this->newTextFileNameInputLabel, $name . "\n"); |
||
47 | } catch (\WebDriver\Exception\NoSuchElement $e) { |
||
|
|||
48 | //this seems to be a bug in MinkSelenium2Driver. Used to work fine in 1.3.1 but now throws this exception |
||
49 | //actually all that we need does happen, so we just don't do anything |
||
50 | } |
||
51 | } else { |
||
52 | // TODO: Handle keeping the default "New text file.txt" name, and just pressing enter |
||
53 | throw new PendingException(); |
||
54 | } |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * finds the textarea field to use for editing a text file |
||
59 | * |
||
60 | * @throws ElementNotFoundException |
||
61 | * @return \Behat\Mink\Element\NodeElement |
||
62 | */ |
||
63 | public function findTextFileEditField() { |
||
72 | |||
73 | /** |
||
74 | * type text into the text area |
||
75 | * |
||
76 | * @param string $text |
||
77 | * @return void |
||
78 | */ |
||
79 | public function typeIntoTextFile($text) { |
||
83 | |||
84 | public function waitTillEditorIsLoaded($timeout_msec = STANDARDUIWAITTIMEOUTMILLISEC) |
||
88 | |||
89 | } |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.