/
pages_for_test.py
29 lines (24 loc) · 1.43 KB
/
pages_for_test.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
# -*- coding: utf-8 -*-
# Licensed under the Open Software License ("OSL") v. 3.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.opensource.org/licenses/osl-3.0.php
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import os
sys.path.insert(0,os.path.abspath(__file__+"/../../"))
from pyccuracy.page import Page
class TestCustomPage (Page):
def register(self):
self.url = "test_custom_page.htm"
self.register_button("My Button", "//div[@class='something']/button[@class='button']")
self.register_checkbox("My Custom Checkbox", "//div[@class='something']/div[@name='other']/input[@type='checkbox' and @value='1']")
self.register_div("Some Div", "//div[@class='something']/div[@name='other']")
self.register_image("Some Image", "//img[@src='bogus_src']")
self.register_link("My Link", "//a[@href='bogus_href']")
self.register_select("Some Select", "//select[@alt='Some Select']")
self.register_textbox("Some Textbox", "//div[contains(@class,'some')]//input[@type='text' and @class='textbox' and @name='some_textbox']")