def test_send_keys_input_text(self):
     self.assertFalse(
         events.wait(driver=driver, target='.test_send_keys', timeout=0))
     events.send_keys(driver=driver,
                      target='#test-send-keys',
                      value='test_send_keys',
                      timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='.test_send_keys', timeout=0))
 def test_send_keys_css_selector(self):
     self.assertFalse(
         events.wait(driver=driver, target='$css.test_send_keys',
                     timeout=0))
     events.send_keys(driver=driver,
                      target='$css#test-send-keys',
                      value='test_send_keys',
                      timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='$css.test_send_keys',
                     timeout=0))
Example #3
0
 def test_hover_xpath_selector(self):
     self.assertFalse(
         events.wait(driver=driver,
                     target='$xpath//body/button[@class="hovered"]',
                     timeout=0))
     events.hover(driver=driver,
                  target='$xpath//body/button[@id="test-hover"]',
                  timeout=0)
     self.assertTrue(
         events.wait(driver=driver,
                     target='$xpath//body/button[@class="hovered"]',
                     timeout=0))
Example #4
0
 def test_click_xpath_selector(self):
     self.assertFalse(
         events.wait(driver=driver,
                     target='$xpath//body/button[@class="clicked"]',
                     timeout=0))
     events.click(driver=driver,
                  target='$xpath//body/button[@id="test-click"]',
                  timeout=0)
     self.assertTrue(
         events.wait(driver=driver,
                     target='$xpath//body/button[@class="clicked"]',
                     timeout=0))
 def test_send_keys_xpath_selector(self):
     self.assertFalse(
         events.wait(driver=driver,
                     target='$xpath//body/input[@class="test_send_keys"]',
                     timeout=0))
     events.send_keys(driver=driver,
                      target='$xpath//body/input[@id="test-send-keys"]',
                      value='test_send_keys',
                      timeout=0)
     self.assertTrue(
         events.wait(driver=driver,
                     target='$xpath//body/input[@class="test_send_keys"]',
                     timeout=0))
Example #6
0
	def test_submit_xpath_selector(self):
		self.assertFalse(events.wait(driver=driver, target='$xpath//body/form[@class="submitted"]', timeout=0))
		events.submit(driver=driver, target='$xpath//body/form[@id="test-submit"]', timeout=0)
		self.assertTrue(events.wait(driver=driver, target='$xpath//body/form[@class="submitted"]', timeout=0))
Example #7
0
	def test_submit_css_selector(self):
		self.assertFalse(events.wait(driver=driver, target='$css.submitted', timeout=0))
		events.submit(driver=driver, target='$css#test-submit', timeout=0)
		self.assertTrue(events.wait(driver=driver, target='$css.submitted', timeout=0))
Example #8
0
	def test_submit_element_present(self):
		self.assertFalse(events.wait(driver=driver, target='.submitted', timeout=0))
		events.submit(driver=driver, target='#test-submit', timeout=0)
		self.assertTrue(events.wait(driver=driver, target='.submitted', timeout=0))
Example #9
0
 def wait(self,
          target: str,
          timeout: int = 16,
          clickable: bool = False) -> bool:
     return events.wait(self.driver, target, timeout, clickable)
Example #10
0
 def test_hover_css_selector(self):
     self.assertFalse(
         events.wait(driver=driver, target='$css.hovered', timeout=0))
     events.hover(driver=driver, target='$css#test-hover', timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='$css.hovered', timeout=0))
Example #11
0
 def test_hover_element_present(self):
     self.assertFalse(
         events.wait(driver=driver, target='.hovered', timeout=0))
     events.hover(driver=driver, target='#test-hover', timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='.hovered', timeout=0))
Example #12
0
 def test_click_css_selector(self):
     self.assertFalse(
         events.wait(driver=driver, target='$css.clicked', timeout=0))
     events.click(driver=driver, target='$css#test-click', timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='$css.clicked', timeout=0))
Example #13
0
 def test_click(self):
     self.assertFalse(
         events.wait(driver=driver, target='.clicked', timeout=0))
     events.click(driver=driver, target='#test-click', timeout=0)
     self.assertTrue(
         events.wait(driver=driver, target='.clicked', timeout=0))