Create Test Case For Address Book Screen
This commit is contained in:
parent
1195a24659
commit
c96a6b87c0
|
@ -46,17 +46,25 @@ if __name__ == '__main__':
|
|||
obj.test_select_address()
|
||||
obj_1=test_telenium_cases.TestSentMessage()
|
||||
obj_1.test_select_sent()
|
||||
obj_1.test_sent_multiple_message()
|
||||
obj_inbox=test_telenium_cases.TestInboxMessage()
|
||||
obj_inbox.test_select_inbox_of_second_address()
|
||||
obj_inbox.test_show_inbox_message()
|
||||
obj_inbox.test_delete_inbox_message()
|
||||
obj_1.test_show_sent_messgae_list()
|
||||
obj_1.test_sent_multiple_message()
|
||||
obj_1.test_serach_sent_messages()
|
||||
obj_1.test_show_sent_message_body()
|
||||
obj_1.test_delete_sent_message_body()
|
||||
obj_1.test_delete_sent_message_from_list()
|
||||
obj_1.test_archive_sent_message_from_list()
|
||||
obj_2=test_telenium_cases.TestDraftMessage()
|
||||
obj_2.test_select_draft_message()
|
||||
obj_2.test_edit_draft_messgae()
|
||||
obj_2.test_delete_draft_message()
|
||||
obj_5=test_telenium_cases.TestAddressBookContact()
|
||||
obj_5.test_save_address()
|
||||
obj_5.test_cancel_address()
|
||||
obj_5.test_send_message_to_addressbook()
|
||||
obj_5.test_delete_address_from_address_contact()
|
||||
|
||||
|
|
@ -66,6 +66,13 @@ class TestInboxMessage(TestSelectAddress):
|
|||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[0]/MDIconButton[0]/MDLabel[0]')
|
||||
time.sleep(3)
|
||||
|
||||
def test_delete_inbox_message(self):
|
||||
time.sleep(4)
|
||||
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Inbox[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[2]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[1]','/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Inbox[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]',1)
|
||||
time.sleep(2)
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Inbox[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
||||
time.sleep(4)
|
||||
|
||||
class TestSentMessage(TestSelectAddress):
|
||||
|
||||
def runTest(self):
|
||||
|
@ -97,17 +104,6 @@ class TestSentMessage(TestSelectAddress):
|
|||
self.cli.click_on('//MDIconButton[2]')
|
||||
time.sleep(2)
|
||||
|
||||
def test_show_sent_messgae_list(self):
|
||||
time.sleep(5)
|
||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||
time.sleep(5)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
||||
time.sleep(5)
|
||||
self.cli.click_on('//NDBadgeLabel[1]')
|
||||
time.sleep(6)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[2]')
|
||||
time.sleep(2)
|
||||
|
||||
def test_sent_multiple_message(self):
|
||||
print("---------ek issue h solve krna hai----")
|
||||
time.sleep(3)
|
||||
|
@ -138,6 +134,17 @@ class TestSentMessage(TestSelectAddress):
|
|||
self.cli.click_on('//NavigationDrawerIconButton[2]')
|
||||
time.sleep(2)
|
||||
|
||||
def test_show_sent_messgae_list(self):
|
||||
time.sleep(5)
|
||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||
time.sleep(5)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
||||
time.sleep(5)
|
||||
self.cli.click_on('//NDBadgeLabel[1]')
|
||||
time.sleep(6)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[2]')
|
||||
time.sleep(2)
|
||||
|
||||
def test_serach_sent_messages(self):
|
||||
print("-------serach message---------")
|
||||
time.sleep(1)
|
||||
|
@ -205,7 +212,7 @@ class TestDraftMessage(TeleniumTestCase):
|
|||
self.cli.click_on('//MyTextInput[0]')
|
||||
time.sleep(3)
|
||||
# ADD FROM MESSAGE
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",data[0])
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
||||
time.sleep(3)
|
||||
# CLICK BACK-BUTTON
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[0]/MDIconButton[0]/MDLabel[0]')
|
||||
|
@ -218,7 +225,7 @@ class TestDraftMessage(TeleniumTestCase):
|
|||
self.cli.click_on('//MyTextInput[0]')
|
||||
time.sleep(3)
|
||||
# ADD FROM MESSAGE
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",data[0])
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/MyTextInput[0]',"text",'BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
||||
time.sleep(4)
|
||||
random_label=""
|
||||
for char in "Another Draft message":
|
||||
|
@ -243,8 +250,6 @@ class TestDraftMessage(TeleniumTestCase):
|
|||
# CLICK EDIT BUTTON
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[2]/MDIconButton[0]/MDLabel[0]')
|
||||
time.sleep(5)
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','draft message')
|
||||
time.sleep(4)
|
||||
random_label=""
|
||||
for char in "Hey,This is draft Message Body":
|
||||
random_label += char
|
||||
|
@ -265,3 +270,69 @@ class TestDraftMessage(TeleniumTestCase):
|
|||
time.sleep(5)
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/Toolbar[0]/BoxLayout[2]/MDIconButton[1]/MDLabel[0]')
|
||||
time.sleep(2)
|
||||
|
||||
class TestAddressBookContact(TeleniumTestCase):
|
||||
|
||||
def runTest(self):
|
||||
print(self,"-------------Welcome To Kivy Testing Application Seven Page-------------")
|
||||
|
||||
def test_save_address(self):
|
||||
print("------------------Save Address In Address Book------------")
|
||||
time.sleep(6)
|
||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||
time.sleep(4)
|
||||
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"All Mails\"]",1)
|
||||
time.sleep(3)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[6]')
|
||||
time.sleep(4)
|
||||
self.cli.execute('app.addingtoaddressbook()')
|
||||
time.sleep(5)
|
||||
self.cli.setattr('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[0]','text','peter')
|
||||
time.sleep(3)
|
||||
self.cli.setattr('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[1]','text','BM-2cSsuH1bUWBski8bvdqnK2DivMqQCeQA1J')
|
||||
time.sleep(5)
|
||||
self.cli.wait_click('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
||||
time.sleep(4)
|
||||
|
||||
def test_cancel_address(self):
|
||||
print("------------------Cancel------------------------")
|
||||
time.sleep(5)
|
||||
self.cli.execute('app.addingtoaddressbook()')
|
||||
time.sleep(5)
|
||||
self.cli.setattr('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[0]','text','prachi')
|
||||
time.sleep(3)
|
||||
self.cli.setattr('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[1]','text',data[0])
|
||||
time.sleep(5)
|
||||
self.cli.click_on('/GrashofPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[1]/MDRaisedButton[1]')
|
||||
|
||||
def test_send_message_to_addressbook(self):
|
||||
print("--------------Directly Send Message To The User-----------")
|
||||
time.sleep(4)
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/AddressBook[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]')
|
||||
time.sleep(5)
|
||||
self.cli.click_on('/AddbookDetailPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
||||
time.sleep(3)
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||
time.sleep(2)
|
||||
self.cli.click_on('//MyTextInput[0]')
|
||||
time.sleep(3)
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','Second')
|
||||
time.sleep(3)
|
||||
random_label=""
|
||||
for char in "Hey This is Message From Address Book":
|
||||
random_label += char
|
||||
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[1]','text',random_label)
|
||||
time.sleep(0.2)
|
||||
self.cli.click_on('//MDIconButton[2]')
|
||||
time.sleep(2)
|
||||
|
||||
def test_delete_address_from_address_contact(self):
|
||||
print("------------Delete Address From Address Contact Book-----------------")
|
||||
time.sleep(6)
|
||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||
time.sleep(4)
|
||||
self.cli.click_on('//NavigationDrawerIconButton[6]')
|
||||
time.sleep(4)
|
||||
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/AddressBook[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[1]/AvatarSampleWidget[0]','/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/AddressBook[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[2]',1)
|
||||
time.sleep(2)
|
||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/AddressBook[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
||||
|
|
Reference in New Issue
Block a user