Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (46 sloc) 1.437 kb
8a1c2e7 Initial meaningful checkin
Justin Bishop authored
1 <?php
2 // Copyright 2004-present Facebook. All Rights Reserved.
0a245ac change to apache license
Justin Bishop authored
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
8a1c2e7 Initial meaningful checkin
Justin Bishop authored
15
365d55c finalize classes
Justin Bishop authored
16 final class WebDriverElement extends WebDriverContainer {
8a1c2e7 Initial meaningful checkin
Justin Bishop authored
17 protected function methods() {
18 return array(
410144e All commands now seem to work.
Justin Bishop authored
19 'click' => 'POST',
20 'submit' => 'POST',
8a1c2e7 Initial meaningful checkin
Justin Bishop authored
21 'text' => 'GET',
410144e All commands now seem to work.
Justin Bishop authored
22 'value' => 'POST',
23 'name' => 'GET',
24 'clear' => 'POST',
25 'selected' => 'GET',
26 'enabled' => 'GET',
9e9a357 simplify out the attribute/ ones to logic too.
Justin Bishop authored
27 'attribute' => 'GET',
28 'equals' => 'GET',
7c2b89a fixes for the outside world.
Justin Bishop authored
29 'displayed' => 'GET',
410144e All commands now seem to work.
Justin Bishop authored
30 'location' => 'GET',
31 'location_in_view' => 'GET',
32 'size' => 'GET',
9e9a357 simplify out the attribute/ ones to logic too.
Justin Bishop authored
33 'css' => 'GET',
8a1c2e7 Initial meaningful checkin
Justin Bishop authored
34 );
35 }
410144e All commands now seem to work.
Justin Bishop authored
36
37 private $id;
38 public function __construct($url, $id) {
39 $this->id = $id;
40 parent::__construct($url);
41 }
42
43 public function getID() {
44 return $this->id;
45 }
46
47 protected function getElementPath($element_id) {
48 return preg_replace(sprintf('/%s$/', $this->id), $element_id, $this->url);
49 }
4138b53 lint
Justin Bishop authored
50 }
Something went wrong with that request. Please try again.