/
__init__.py
111 lines (75 loc) · 2.35 KB
/
__init__.py
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
class DriverAPI(object):
@property
def title(self):
raise NotImplementedError
@property
def html(self):
raise NotImplementedError
@property
def url(self):
raise NotImplementedError
def visit(self, url):
raise NotImplementedError
def reload(self):
raise NotImplementedError
def switch_to_frame(self, id):
raise NotImplementedError
def execute_script(self, script):
raise NotImplementedError
def evaluate_script(self, script):
raise NotImplementedError
def find_by_css(self, css_selector):
raise NotImplementedError
find_by_css_selector = find_by_css
def find_by_xpath(self, xpath):
raise NotImplementedError
def find_by_name(self, name):
raise NotImplementedError
def find_by_id(self, id):
raise NotImplementedError
def find_by_tag(self, tag):
raise NotImplementedError
def find_link_by_href(self, href):
raise NotImplementedError
def find_link_by_text(self, text):
raise NotImplementedError
def wait_for_element(self, selector, timeout, interval):
raise NotImplementedError
def fill(self, name, value):
raise NotImplementedError
fill_in = fill
attach_file = fill
def choose(self, name):
raise NotImplementedError
def check(self, name):
raise NotImplementedError
def uncheck(self, name):
raise NotImplementedError
def click_link_by_href(self, href):
return self.find_link_by_href(href).first.click()
def click_link_by_text(self, text):
return self.find_link_by_text(text).first.click()
def quit(self):
raise NotImplementedError
class ElementAPI(object):
def _get_value(self):
raise NotImplementedError
def _set_value(self, value):
raise NotImplementedError
value = property(_get_value, _set_value)
def click(self):
raise NotImplementedError
def check(self):
raise NotImplementedError
def uncheck(self):
raise NotImplementedError
def mouseover(self):
raise NotImplementedError
@property
def checked(self):
raise NotImplementedError
@property
def visible(self):
raise NotImplementedError
def __getitem__(self, attribute):
raise NotImplementedError