summaryrefslogtreecommitdiff
path: root/tests/bodyClick.py
blob: 0c10d632346fc68f14ded67459ac5427be9af66e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import unittest
import base

class Suite(base.Base):
    def test_1(self):
        """Test case 1"""
        self.start('main')
        bd = self.driver.find_element_by_xpath('/html/body')

        bd.click()
        alert = self.driver.switch_to.alert
        self.assertEqual("You clicked the body.", alert.text)
        alert.accept()

        bd.send_keys('h')
        alert = self.driver.switch_to.alert
        self.assertEqual("Key", alert.text)
        alert.accept()