Create Test CaseFor Setting and MyAddress Window
This commit is contained in:
parent
71468b8318
commit
0d137d410f
|
@ -8,46 +8,52 @@ from random import choice
|
||||||
from string import ascii_lowercase
|
from string import ascii_lowercase
|
||||||
|
|
||||||
|
|
||||||
class TestBitMessageApp(TeleniumTestCase):
|
class Bitmessage_Login_Screen(TeleniumTestCase):
|
||||||
|
"""Login Functionality Testing"""
|
||||||
cmd_entrypoint = [u'/home/cis/peterwork_new/PyBitmessage/src/main.py']
|
cmd_entrypoint = [u'/home/cis/peterwork_new/PyBitmessage/src/main.py']
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application-------------")
|
"""Test Run Method."""
|
||||||
|
print(self,"=====================Welcome To Kivy Testing Application=====================")
|
||||||
|
|
||||||
def test_login_screen(self):
|
def test_login_screen(self):
|
||||||
print(self,"---------------------------")
|
"""Clicking on Proceed Button to Proceed to Next Screen."""
|
||||||
time.sleep(5)
|
print("=====================Test - Login Screen=====================")
|
||||||
print("first screen")
|
time.sleep(3)
|
||||||
self.cli.drag("/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/MDCheckbox[0]","/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]",2)
|
self.cli.drag("/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/MDCheckbox[0]","/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]",2)
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
|
|
||||||
def test_random_screen(self):
|
def test_random_screen(self):
|
||||||
|
"""Creating New Adress For New User."""
|
||||||
|
print("=====================Test - Create New Address=====================")
|
||||||
random_label = ""
|
random_label = ""
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
random_label += choice(ascii_lowercase)
|
random_label += choice(ascii_lowercase)
|
||||||
self.cli.setattr(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]', "text", random_label)
|
self.cli.setattr(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]', "text", random_label)
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
|
time.sleep(1)
|
||||||
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Random[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
"""Start Application"""
|
||||||
TeleniumTestCase.start_process()
|
TeleniumTestCase.start_process()
|
||||||
TestBitMessageApp().runTest()
|
Bitmessage_Login_Screen().runTest()
|
||||||
print("==================start from first screen=====================")
|
print("==================start from first screen=====================")
|
||||||
f=open("/home/cis/.config/PyBitmessage/keys.dat")
|
f=open("/home/cis/.config/PyBitmessage/keys.dat")
|
||||||
get_file=f.read()
|
get_file=f.read()
|
||||||
find_address=get_file.find("label")
|
find_address=get_file.find("label")
|
||||||
print(find_address)
|
print(find_address)
|
||||||
if find_address != -1:
|
if find_address != -1:
|
||||||
select_address=test_telenium_cases.TestSelectAddress()
|
select_address=test_telenium_cases.Bitmessage_Select_Address()
|
||||||
select_address.test_check_already_created_address()
|
select_address.test_check_already_created_address()
|
||||||
select_address.test_calling_all_methods()
|
select_address.test_calling_all_methods()
|
||||||
sent_message=test_telenium_cases.TestSentMessage()
|
sent_message=test_telenium_cases.Bitmessage_Sent_Screen_Message()
|
||||||
sent_message.test_select_sent()
|
sent_message.test_select_sent()
|
||||||
sent_message.test_sent_multiple_message()
|
sent_message.test_sent_multiple_message()
|
||||||
inbox_message=test_telenium_cases.TestInboxMessage()
|
inbox_message=test_telenium_cases.Bitmessage_Inbox_Screen_Message()
|
||||||
inbox_message.test_all_inbox_method()
|
inbox_message.test_all_inbox_method()
|
||||||
sent_message.test_all_sent_method()
|
sent_message.test_all_sent_method()
|
||||||
# sent_message.test_archive_sent_message_from_list()
|
# sent_message.test_archive_sent_message_from_list()
|
||||||
|
@ -61,17 +67,17 @@ if __name__ == '__main__':
|
||||||
address_book=test_telenium_cases.TestAddressBookContact()
|
address_book=test_telenium_cases.TestAddressBookContact()
|
||||||
address_book.test_all_address_book_method()
|
address_book.test_all_address_book_method()
|
||||||
else :
|
else :
|
||||||
TestBitMessageApp().test_login_screen()
|
Bitmessage_Login_Screen().test_login_screen()
|
||||||
TestBitMessageApp().test_random_screen()
|
Bitmessage_Login_Screen().test_random_screen()
|
||||||
new_address=test_telenium_cases.TestCreateNewAddress()
|
new_address=test_telenium_cases.Bitmessage_Create_New_Address()
|
||||||
new_address.test_create_new_address()
|
new_address.test_create_new_address()
|
||||||
TestBitMessageApp().test_random_screen()
|
Bitmessage_Login_Screen().test_random_screen()
|
||||||
select_address=test_telenium_cases.TestSelectAddress()
|
select_address=test_telenium_cases.Bitmessage_Select_Address()
|
||||||
select_address.test_calling_all_methods()
|
select_address.test_calling_all_methods()
|
||||||
sent_message=test_telenium_cases.TestSentMessage()
|
sent_message=test_telenium_cases.Bitmessage_Sent_Screen_Message()
|
||||||
sent_message.test_select_sent()
|
sent_message.test_select_sent()
|
||||||
sent_message.test_sent_multiple_message()
|
sent_message.test_sent_multiple_message()
|
||||||
inbox_message=test_telenium_cases.TestInboxMessage()
|
inbox_message=test_telenium_cases.Bitmessage_Inbox_Screen_Message()
|
||||||
inbox_message.test_all_inbox_method()
|
inbox_message.test_all_inbox_method()
|
||||||
sent_message.test_all_sent_method()
|
sent_message.test_all_sent_method()
|
||||||
# sent_message.test_archive_sent_message_from_list()
|
# sent_message.test_archive_sent_message_from_list()
|
||||||
|
@ -83,8 +89,4 @@ if __name__ == '__main__':
|
||||||
all_mails.test_select_all_mails()
|
all_mails.test_select_all_mails()
|
||||||
all_mails.test_delete_message_from_draft()
|
all_mails.test_delete_message_from_draft()
|
||||||
address_book=test_telenium_cases.TestAddressBookContact()
|
address_book=test_telenium_cases.TestAddressBookContact()
|
||||||
address_book.test_all_address_book_method()
|
address_book.test_all_address_book_method()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,27 +5,35 @@ import string
|
||||||
import os
|
import os
|
||||||
data=[]
|
data=[]
|
||||||
|
|
||||||
class TestCreateNewAddress(TeleniumTestCase):
|
# class TestCreateNewAddress(TeleniumTestCase):
|
||||||
|
class Bitmessage_Create_New_Address(TeleniumTestCase):
|
||||||
|
"""Generate New Address Functionality Testing"""
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application Thirteenth Page-------------")
|
print(self,"-------------Welcome To Kivy Testing Application Thirteenth Page-------------")
|
||||||
|
|
||||||
def test_create_new_address(self):
|
def test_create_new_address(self):
|
||||||
|
"""Clicking on Navigation Drawer To Open New Address"""
|
||||||
|
print("=====================Test - Create New Address=====================")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(4)
|
time.sleep(2)
|
||||||
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"All Mails\"]",1)
|
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"All Mails\"]",1)
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[10]')
|
self.cli.click_on('//NavigationDrawerIconButton[10]')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
self.cli.wait_click(u'/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Login[0]/ScrollView[0]/BoxLayout[0]/BoxLayout[2]/AnchorLayout[0]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
|
|
||||||
class TestSelectAddress(TeleniumTestCase):
|
# class TestSelectAddress(TeleniumTestCase):
|
||||||
|
class Bitmessage_Select_Address(TeleniumTestCase):
|
||||||
|
"""Select Address Functionality Testing"""
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application second Page-------------")
|
print(self,"-------------Welcome To Kivy Testing Application second Page-------------")
|
||||||
|
|
||||||
def test_check_already_created_address(self):
|
def test_check_already_created_address(self):
|
||||||
|
"""Check The Address Is Already Created Or Not"""
|
||||||
|
print("=====================Test - Select Address From Navigation Drawer=====================")
|
||||||
time.sleep(6)
|
time.sleep(6)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
@ -35,44 +43,51 @@ class TestSelectAddress(TeleniumTestCase):
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
def test_select_second_address(self):
|
def test_select_second_address(self):
|
||||||
global data
|
"""Select Text From Second Address Generated"""
|
||||||
time.sleep(5)
|
print("=====================Test - Select Text From Second Address Created====================")
|
||||||
|
global data
|
||||||
|
time.sleep(3)
|
||||||
second_address=self.cli.getattr("//CustomTwoLineAvatarIconListItem[0]","secondary_text")
|
second_address=self.cli.getattr("//CustomTwoLineAvatarIconListItem[0]","secondary_text")
|
||||||
data.append(second_address)
|
data.append(second_address)
|
||||||
return data[0]
|
return data[0]
|
||||||
|
|
||||||
def test_select_address(self):
|
def test_select_address(self):
|
||||||
time.sleep(8)
|
"""Select First Address From Drawer-Box"""
|
||||||
|
print("=====================Test - Select First Address From Drawer-Box=======================")
|
||||||
|
time.sleep(4)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"Address Book\"]",2)
|
self.cli.drag("//NavigationDrawerSubheader[@text=\"All labels\"]","//NavigationDrawerIconButton[@text=\"Address Book\"]",2)
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NDBadgeLabel[1]')
|
self.cli.click_on('//NDBadgeLabel[1]')
|
||||||
time.sleep(5)
|
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[1]')
|
|
||||||
time.sleep(5)
|
|
||||||
|
|
||||||
def test_calling_all_methods(self):
|
def test_calling_all_methods(self):
|
||||||
self.test_select_second_address()
|
self.test_select_second_address()
|
||||||
self.test_select_address()
|
self.test_select_address()
|
||||||
|
|
||||||
class TestInboxMessage(TestSelectAddress):
|
# class TestInboxMessage(TestSelectAddress):
|
||||||
|
class Bitmessage_Inbox_Screen_Message(TeleniumTestCase):
|
||||||
|
"""Inbox Screen Functionality Testing"""
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application For Inbox Screen-------------")
|
print(self,"-------------Welcome To Kivy Testing Application For Inbox Screen-------------")
|
||||||
|
|
||||||
def test_select_inbox_of_second_address(self):
|
def test_select_inbox_of_second_address(self):
|
||||||
|
"""Select Inbox Screen From Navigation-Drawer-Box"""
|
||||||
|
print("=====================Test - Select Second Address From Drawer-Box=======================")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
self.cli.click_on('//NavigationDrawerIconButton[0]')
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
self.cli.click_on('//NDBadgeLabel[2]')
|
self.cli.click_on('//NDBadgeLabel[2]')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def test_show_inbox_message(self):
|
def test_show_inbox_message(self):
|
||||||
|
"""Select First Message from Inbox Screen"""
|
||||||
|
print("=====================Test - Select First Message from Inbox Screen=====================")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
@ -82,6 +97,8 @@ class TestInboxMessage(TestSelectAddress):
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
def test_delete_inbox_message(self):
|
def test_delete_inbox_message(self):
|
||||||
|
"""Deleting Message From Inbox Screen"""
|
||||||
|
print("=====================Test - Deleting Message From Inbox Screen=====================")
|
||||||
time.sleep(4)
|
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)
|
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)
|
time.sleep(2)
|
||||||
|
@ -89,17 +106,22 @@ class TestInboxMessage(TestSelectAddress):
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
def test_all_inbox_method(self):
|
def test_all_inbox_method(self):
|
||||||
|
"""Calling All The Methods Inbox Class"""
|
||||||
self.test_select_inbox_of_second_address()
|
self.test_select_inbox_of_second_address()
|
||||||
self.test_show_inbox_message()
|
self.test_show_inbox_message()
|
||||||
self.test_delete_inbox_message()
|
self.test_delete_inbox_message()
|
||||||
|
|
||||||
class TestSentMessage(TestSelectAddress):
|
# class TestSentMessage(TestSelectAddress):
|
||||||
|
class Bitmessage_Sent_Screen_Message(TeleniumTestCase):
|
||||||
|
"""Sent Screen Functionality Testing"""
|
||||||
|
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
print(self,"-------------Welcome To Kivy Testing Application Thirds Page-------------")
|
print(self,"-------------Welcome To Kivy Testing Application Thirds Page-------------")
|
||||||
|
|
||||||
def test_select_sent(self):
|
def test_select_sent(self):
|
||||||
print("ek issue h solve krna hai----")
|
"""Sending Message From Inbox Screen
|
||||||
|
opens a pop-up(screen)which send message from sender to reciever"""
|
||||||
|
print("=====================Test - Sending Message From Inbox Screen=====================")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -125,7 +147,9 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def test_sent_multiple_message(self):
|
def test_sent_multiple_message(self):
|
||||||
print("---------ek issue h solve krna hai----")
|
"""Sending Second Message From Inbox Screen
|
||||||
|
for testing the search and delete functionality for two messages on the screen"""
|
||||||
|
print("=====================Test - Sending Message From Inbox Screen=====================")
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -155,6 +179,8 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def test_show_sent_messgae_list(self):
|
def test_show_sent_messgae_list(self):
|
||||||
|
"""Displaying All the Messages on Sent Screen"""
|
||||||
|
print("=====================Test - Show Sent Screen Message=====================")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.execute('app.root.toggle_nav_drawer()')
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -165,8 +191,9 @@ class TestSentMessage(TestSelectAddress):
|
||||||
self.cli.click_on('//NavigationDrawerIconButton[2]')
|
self.cli.click_on('//NavigationDrawerIconButton[2]')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def test_serach_sent_messages(self):
|
def test_search_sent_messages(self):
|
||||||
print("-------serach message---------")
|
"""Search Message From a Word Of Subject/Body on Sent Screen"""
|
||||||
|
print("=====================Test - Search Message On The Sent Screen=====================")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/SearchBar[0]/MDTextField[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/SearchBar[0]/MDTextField[0]')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
@ -178,7 +205,8 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
def test_show_sent_message_body(self):
|
def test_show_sent_message_body(self):
|
||||||
print("-------------check message body------------")
|
"""Show A Message From Message Body"""
|
||||||
|
print("=====================Test - Show A Message From Message Body=====================")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.click_on('//Carousel[0]')
|
self.cli.click_on('//Carousel[0]')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -186,7 +214,8 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def test_delete_sent_message_body(self):
|
def test_delete_sent_message_body(self):
|
||||||
print("------------Delete messgae from message body option-----------------.")
|
"""Delete A Message From Message Body"""
|
||||||
|
print("=====================Test - Delete A Message From Message Body=====================")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[2]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[2]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
@ -194,14 +223,16 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
def test_delete_sent_message_from_list(self):
|
def test_delete_sent_message_from_list(self):
|
||||||
print("-----------Delete messgae from message list-------------.")
|
"""Delete A Message From List Of Messages Of Sent Screen"""
|
||||||
|
print("=====================Test - Delete A Message From List Of Messages=====================")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[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]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]',1)
|
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[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]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]',1)
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
||||||
|
|
||||||
def test_archive_sent_message_from_list(self):
|
def test_archive_sent_message_from_list(self):
|
||||||
print("-----------Archive Message From Message List-----------")
|
"""Archive A Message From List Of Messages Of Sent Screen"""
|
||||||
|
print("=====================Test - Archive A Message From List Of Messages=====================")
|
||||||
# Swipe-Arrchive-Sent-Message
|
# Swipe-Arrchive-Sent-Message
|
||||||
time.sleep(7)
|
time.sleep(7)
|
||||||
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[2]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[0]','/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[0]/Button[0]',1)
|
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[2]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[0]','/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Sent[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[0]/Button[0]',1)
|
||||||
|
@ -210,8 +241,9 @@ class TestSentMessage(TestSelectAddress):
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
def test_all_sent_method(self):
|
def test_all_sent_method(self):
|
||||||
|
"""Calling All The Methods Sent Class"""
|
||||||
self.test_show_sent_messgae_list()
|
self.test_show_sent_messgae_list()
|
||||||
self.test_serach_sent_messages()
|
self.test_search_sent_messages()
|
||||||
self.test_show_sent_message_body()
|
self.test_show_sent_message_body()
|
||||||
self.test_delete_sent_message_body()
|
self.test_delete_sent_message_body()
|
||||||
self.test_delete_sent_message_from_list()
|
self.test_delete_sent_message_from_list()
|
||||||
|
@ -340,7 +372,7 @@ class TestTrashMessage(TeleniumTestCase):
|
||||||
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Trash[0]/Trash[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]/Trash[0]/Trash[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[2]',1)
|
self.cli.drag('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Trash[0]/Trash[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]/Trash[0]/Trash[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[2]',1)
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Trash[0]/Trash[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Trash[0]/Trash[0]/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/Carousel[0]/RelativeLayout[1]/Button[0]')
|
||||||
time.sleep(5)
|
time.sleep(2)
|
||||||
self.cli.click_on('//MDRaisedButton[0]')
|
self.cli.click_on('//MDRaisedButton[0]')
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
|
@ -368,7 +400,7 @@ class TestAddressBookContact(TeleniumTestCase):
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
|
|
||||||
def test_cancel_address(self):
|
def test_cancel_address(self):
|
||||||
print("------------------Cancel------------------------")
|
print("------------------Cancel Address------------------------")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.cli.execute('app.addingtoaddressbook()')
|
self.cli.execute('app.addingtoaddressbook()')
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
@ -416,3 +448,48 @@ class TestAddressBookContact(TeleniumTestCase):
|
||||||
self.test_send_message_to_addressbook()
|
self.test_send_message_to_addressbook()
|
||||||
self.test_delete_address_from_address_contact()
|
self.test_delete_address_from_address_contact()
|
||||||
|
|
||||||
|
class TestSetting(TeleniumTestCase):
|
||||||
|
|
||||||
|
def runTest(self):
|
||||||
|
print(self,"-------------Welcome To Kivy Testing Application Eight Page-------------")
|
||||||
|
|
||||||
|
def test_setting(self):
|
||||||
|
print("--------Show Setting Screen-------")
|
||||||
|
time.sleep(6)
|
||||||
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.click_on('//NavigationDrawerIconButton[7]')
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
class TestMyAddress(TeleniumTestCase):
|
||||||
|
|
||||||
|
def runTest(self):
|
||||||
|
print(self,"-------------Welcome To Kivy Testing Application Ninth Page-------------")
|
||||||
|
|
||||||
|
def test_select_myaddress_list(self):
|
||||||
|
print("-----------Select Address From List of Address------------")
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.execute('app.root.toggle_nav_drawer()')
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.click_on('//NavigationDrawerIconButton[12]')
|
||||||
|
time.sleep(4)
|
||||||
|
|
||||||
|
def test_send_message_from(self):
|
||||||
|
print("------------Send Message From Send Message From Button------------")
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.click_on('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/MyAddress[0]/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]/BoxLayout[0]/MDLabel[1]')
|
||||||
|
time.sleep(5)
|
||||||
|
self.cli.click_on('/MyaddDetailPopup/GridLayout[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]')
|
||||||
|
time.sleep(4)
|
||||||
|
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])
|
||||||
|
time.sleep(4)
|
||||||
|
self.cli.setattr('/NavigationLayout/BoxLayout[1]/FloatLayout[0]/BoxLayout[0]/ScreenManager[0]/Create[0]/DropDownWidget[0]/ScrollView[0]/BoxLayout[0]/MDTextField[0]','text','Hey')
|
||||||
|
time.sleep(3)
|
||||||
|
random_label=""
|
||||||
|
for char in "Hey,i am sending message directly from MyAddress 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)
|
||||||
|
time.sleep(2)
|
||||||
|
self.cli.click_on('//MDIconButton[2]')
|
||||||
|
time.sleep(2)
|
||||||
|
|
Reference in New Issue
Block a user