コード例 #1
0
def wait(string=None):

    if (string in BUTTON):

        if (string in BUTTON[:6] or string == 'Add an Item'):

            sleep(1)

            WebDriverWait(driver,999).until(EC.presence_of_element_located(
                (By.XPATH, "//body[@class='o_web_client']")))

        wait_until(Button(string).exists,999)

    else:
        wait_until(Text(string).exists,999)
コード例 #2
0
ファイル: test_find_all.py プロジェクト: zv100558snv/helium
	def test_find_all_non_existent_button(self):
		self.assertEqual([], find_all(Button("Non-existent Button")))
コード例 #3
0
 def test_button_tag_button_exists(self):
     self.assertTrue(Button("Button tag without type").exists())
コード例 #4
0
 def test_button_no_text(self):
     self.assertEqual(2, len(find_all(Button(to_right_of='Row 1'))))
コード例 #5
0
 def test_enabled_button(self):
     self.assertIs(True, Button("Enabled Button").is_enabled())
コード例 #6
0
 def test_button_not_exists(self):
     self.assertFalse(Button("Nonexistent Button").exists())
コード例 #7
0
 def test_submit_button_exists_lower_case(self):
     self.assertTrue(Button("submit button").exists())
コード例 #8
0
 def test_button_exists(self):
     self.assertTrue(Button("Enabled Button").exists())
コード例 #9
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_doubleclick_top_left(self):
     doubleclick(Button("Button 1").top_left)
     self.assert_result_is("Button 1 doubleclicked at offset (0, 0).",
                           offset_delta=(1, 1))
コード例 #10
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_rightclick_top_left_offset(self):
     rightclick(Button("Button 3").top_left + (3, 4))
     self.assert_result_is("Button 3 rightclicked at offset (3, 4).")
コード例 #11
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_hover_top_left_offset(self):
     hover(Button("Button 3").top_left + (3, 4))
     self.assert_result_is("Button 3 hovered at offset (3, 4).")
コード例 #12
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_hover_top_left(self):
     hover(Button("Button 1").top_left)
     self.assert_result_is("Button 1 hovered at offset (0, 0).",
                           offset_delta=(1, 1))
コード例 #13
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_top_left(self):
     self.assert_is_in_range(Point(2, 3),
                             Button("Button 1").top_left,
                             delta=(0, 1))
コード例 #14
0
ファイル: test_find_all.py プロジェクト: zv100558snv/helium
	def test_find_all_duplicate_button_to_right_of(self):
		self.assertEqual(
			2, len(find_all(Button("Duplicate Button", to_right_of="Row 1")))
		)
コード例 #15
0
ファイル: test_find_all.py プロジェクト: zv100558snv/helium
	def test_find_all_duplicate_button(self):
		self.assertEqual(4, len(find_all(Button("Duplicate Button"))))
コード例 #16
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_submit_button_exists(self):
     self.assertTrue(Button("Submit").exists())
コード例 #17
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_button_exists(self):
     self.assertTrue(Button("Close").exists())
コード例 #18
0
ファイル: test_point.py プロジェクト: zv100558snv/helium
 def test_doubleclick_top_left_offset(self):
     doubleclick(Button("Button 3").top_left + (3, 4))
     self.assert_result_is("Button 3 doubleclicked at offset (3, 4).")
コード例 #19
0
 def test_submit_button_exists(self):
     self.assertTrue(Button("Submit Button").exists())
コード例 #20
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_button_is_enabled(self):
     self.assertTrue(Button("Close").is_enabled())
コード例 #21
0
 def test_input_button_exists(self):
     self.assertTrue(Button("Input Button").exists())
コード例 #22
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_disabled_button_is_enabled(self):
     self.assertFalse(Button("Disabled Close").is_enabled())
コード例 #23
0
 def test_text_field_does_not_exist_as_button(self):
     self.assertFalse(Button("Example Text Field").exists())
コード例 #24
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_non_existent_button(self):
     self.assertFalse(Button("This doesnt exist").exists())
コード例 #25
0
 def test_disabled_button(self):
     self.assertFalse(Button("Disabled Button").is_enabled())
コード例 #26
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_div_button_exists(self):
     self.assertTrue(Button("Attach files").exists())
コード例 #27
0
 def test_div_button_exists(self):
     self.assertTrue(Button("DIV with role=button").exists())
コード例 #28
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_div_button_is_enabled(self):
     self.assertTrue(Button("Attach files").is_enabled())
コード例 #29
0
 def test_submit_button_can_be_found_by_title(self):
     self.assertTrue(Button("submitButtonTitle").exists())
コード例 #30
0
ファイル: test_aria.py プロジェクト: zv100558snv/helium
 def test_aria_label_div_disabled_button_is_enabled(self):
     self.assertFalse(Button("Disabled Attach files").is_enabled())