fixed test cases sleep
This commit is contained in:
parent
949a7c2f4e
commit
e239a6de0d
|
@ -1,3 +1,4 @@
|
|||
from turtle import pd
|
||||
from bitmessagekivy.get_platform import platform
|
||||
from bitmessagekivy import kivy_helper_search
|
||||
from helper_sql import sqlExecute
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from tkinter.constants import S
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
|
||||
|
@ -15,45 +16,49 @@ class AddressBook(TeleniumTestProcess):
|
|||
"""Save Address On Address Book Screen/Window"""
|
||||
print("=====================Test -Save Address In Address Book=====================")
|
||||
self.cli.sleep(12)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[6]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=0)
|
||||
self.cli.sleep(4)
|
||||
|
||||
# this is for checking current screen
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=3)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=2)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# this is for scrolling Nav drawer
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# assert for checking scroll function
|
||||
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
|
||||
# this is for opening setting screen
|
||||
self.cli.wait_click('//NavigationItem[@text=\"Address Book\"]', timeout=2)
|
||||
# Checking current screen
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
|
||||
# Click on Account-Plus Icon to opeb popup for add Address
|
||||
self.cli.execute('app.addingtoaddressbook()')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[0]')
|
||||
self.cli.sleep(3)
|
||||
# Checking the popup opened
|
||||
# self.assertExists("//GrashofPopup/MDRaisedButton[@text=\"Save\"]", timeout=4)
|
||||
# Click on Label field to check validation
|
||||
self.cli.wait_click('//GrashofPopup/BoxLayout[0]/MDTextField[0]', timeout=2)
|
||||
# Checking the Label Field shows Validation for empty string
|
||||
self.assertExists('//GrashofPopup/BoxLayout[0]/MDTextField[@text=\"\"]', timeout=2)
|
||||
# # Click on Address Field
|
||||
self.cli.wait_click('//GrashofPopup/BoxLayout[0]/MDTextField[1]', timeout=2)
|
||||
# Checking the Address Field shows Validation for empty string
|
||||
self.assertExists('//GrashofPopup/BoxLayout[0]/MDTextField[@text=\"\"]', timeout=2)
|
||||
# Click On save Button to check Field validation
|
||||
self.cli.wait_click('//MDRaisedButton[0]', timeout=2)
|
||||
# Add Label to label Field
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]', 'text', 'test1')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', 'sectorAppartment')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(5)
|
||||
self.cli.click_on('//GrashofPopup/BoxLayout[0]/MDTextField[1]')
|
||||
self.cli.sleep(3)
|
||||
# Add incorrect Address to Address Field to check validation
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', data[0])
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', '')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(4)
|
||||
# Click on Save Button to check the address is correct or not
|
||||
self.cli.wait_click('//MDRaisedButton[0]')
|
||||
# Add Correct Address
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', 'BM-2cX78L9CZpb6GGC3rRVizYiUBwHELMLybd')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.cli.sleep(4)
|
||||
# Click on Save Button
|
||||
self.cli.wait_click('//MDRaisedButton[0]', timeout=2)
|
||||
# Check Current Screen (Address Book)
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
# Checking Number of addresses increased
|
||||
address_book_msgs = len(self.cli.select("//SwipeToDeleteItem"))
|
||||
self.assertEqual(address_book_msgs, 1)
|
||||
|
||||
|
@ -61,59 +66,72 @@ class AddressBook(TeleniumTestProcess):
|
|||
def test_cancel_addressbook_popup(self):
|
||||
"""Cancel Address"""
|
||||
print("=====================Test -Cancel Address Add Popup=====================")
|
||||
self.cli.sleep(3)
|
||||
# Click on Account-Plus Icon to opeb popup for add Address
|
||||
self.cli.execute('app.addingtoaddressbook()')
|
||||
self.cli.sleep(3)
|
||||
# Add Label to label Field
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[0]', 'text', 'test2')
|
||||
self.cli.sleep(3)
|
||||
# Add Address to Address Field
|
||||
self.cli.setattr('//GrashofPopup/BoxLayout[0]/MDTextField[1]', 'text', data[0])
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[1]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=1)
|
||||
# Click on Save Button
|
||||
self.cli.wait_click('//MDRaisedButton[1]', timeout=2)
|
||||
# Check Current Screen (Address Book)
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
|
||||
@ordered
|
||||
def test_send_message_to_addressbook(self):
|
||||
"""Directly Send Message To The User"""
|
||||
print("=====================Test -Directly Send Message To The User=====================")
|
||||
self.cli.sleep(4)
|
||||
self.cli.click_on(
|
||||
'//AddressBook/BoxLayout[0]/BoxLayout[0]/ScrollView[0]/MDList[0]/SwipeToDeleteItem[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//MDRaisedButton[0]')
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=1)
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/BoxLayout[0]/CustomSpinner[0]/ArrowImg[0]')
|
||||
self.cli.sleep(5)
|
||||
# self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[1]/BoxLayout[0]/MyTextInput[0]')
|
||||
self.cli.click_on('//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput')
|
||||
self.cli.sleep(3)
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Second')
|
||||
self.cli.sleep(3)
|
||||
random_label = ""
|
||||
for char in "Hey This is Message From Address Book":
|
||||
random_label += char
|
||||
self.cli.setattr(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', 'text', random_label)
|
||||
self.cli.sleep(0.2)
|
||||
self.cli.click_on('//MDActionTopAppBarButton[2]')
|
||||
self.cli.sleep(4)
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=1)
|
||||
# Check Current Screen (Address Book)
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
# Click on a Address to show address Details
|
||||
self.cli.wait_click(
|
||||
'//AddressBook/BoxLayout[0]//SwipeToDeleteItem[0]', timeout=2)
|
||||
# Checking the pop us opened
|
||||
self.assertNotExists('//AddbookDetailPopup//MDDialog[@state~=\"closed\"]', timeout=2)
|
||||
# Click on the Send to message Button
|
||||
self.cli.wait_click('//MDRaisedButton[0]', timeout=2)
|
||||
# Redirected to message composer screen(create)
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
# Open and select Sender's Address from DropDown
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[0]', 'text', 'BM-2cVpswZo8rWLXDVtZEUNcDQvnvHJ6TLRYr')
|
||||
# Checking the Sender's Field is Entered
|
||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/BoxLayout[0]/MDTextField[0]', '')
|
||||
# ADD SUBJECT
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Demo Subject')
|
||||
# Checking Subject Field is Entered
|
||||
self.assertExists('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[@text=\"Demo Subject\"]', timeout=2)
|
||||
# ADD MESSAGE BODY
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]',
|
||||
'text', 'Hey,This is draft Message Body from Address Book')
|
||||
# Checking Message body is Entered
|
||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', '')
|
||||
# Click on Send Icon
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[2]', timeout=3)
|
||||
# After Click send, Screen is redirected to Inbox screen
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=5)
|
||||
|
||||
@ordered
|
||||
def test_delete_address_from_address_contact(self):
|
||||
"""Delete Address From Address Book"""
|
||||
print("=====================Test -Delete Address From Address Book=====================")
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
||||
self.cli.sleep(3)
|
||||
self.cli.click_on('//NavigationItem[6]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=1)
|
||||
|
||||
|
||||
# this is for checking current screen
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=3)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=2)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# this is for opening setting screen
|
||||
self.cli.wait_click('//NavigationItem[@text=\"Address Book\"]', timeout=2)
|
||||
# Checking current screen
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
self.cli.sleep(3)
|
||||
|
||||
self.cli.drag(
|
||||
'//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||
'//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 1)
|
||||
self.cli.click_on('//MDList[0]/SwipeToDeleteItem[0]')
|
||||
self.cli.sleep(2)
|
||||
self.cli.click_on('//MDList[0]/SwipeToDeleteItem[0]//MDIconButton[0]')
|
||||
self.assertExists("//AddressBook[@name~=\"addressbook\"]", timeout=2)
|
||||
'//MDList[0]/SwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]',2)
|
||||
self.cli.sleep(3)
|
||||
|
||||
self.cli.wait_click(
|
||||
'//AddressBook/BoxLayout[0]//SwipeToDeleteItem[0]', timeout=2)
|
|
@ -1,3 +1,4 @@
|
|||
from time import sleep
|
||||
from requests.packages.urllib3.util import timeout
|
||||
from .telenium_process import TeleniumTestProcess
|
||||
from .common import ordered
|
||||
|
@ -26,110 +27,99 @@ class MyAddressScreen(TeleniumTestProcess):
|
|||
# this is for scrolling Nav drawer
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# assert for checking scroll function
|
||||
self.assertExists('//NavigationItem[@text=\"My addresses\"]', timeout=2)
|
||||
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
|
||||
# self.assertExists('//NavigationItem[@text=\"My addresses\"]', timeout=2)
|
||||
# this is for opening setting screen
|
||||
self.cli.wait_click('//NavigationItem[@text=\"My addresses\"]', timeout=2)
|
||||
# Checking current screen
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
|
||||
@ordered
|
||||
def test_show_Qrcode(self):
|
||||
"""Show the Qr code of selected address"""
|
||||
print("=====================Test -Show QR code of selected address=====================")
|
||||
# Checking current screen
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
# Click on Address to open popup
|
||||
self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# Check the Popup is opened
|
||||
self.assertExists('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[@text=\"Show QR code\"]', timeout=2)
|
||||
# Cick on 'Show QR code' button to view QR Code
|
||||
self.cli.wait_click('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
|
||||
# Check Current screen is QR Code screen
|
||||
self.assertExists("//ShowQRCode[@name~=\"showqrcode\"]", timeout=2)
|
||||
# Click on BACK button
|
||||
self.cli.wait_click('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]', timeout=2)
|
||||
# Checking current screen(My Address) after BACK press
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
|
||||
@ordered
|
||||
def test_send_message_from(self):
|
||||
"""Send Message From Send Message From Button"""
|
||||
print("=====================Test -Send Message From Send Message From Button=====================")
|
||||
self.cli.sleep(2)
|
||||
# Checking current screen
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
# Click on Address to open popup
|
||||
self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# Checking Popup Opened
|
||||
self.assertExists('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[@text=\"Send message from\"]', timeout=2)
|
||||
# Click on Send Message Button to redirect Create Screen
|
||||
self.cli.wait_click('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]', timeout=2)
|
||||
# Checking Current screen(Create )
|
||||
self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
# Entering Receiver Address
|
||||
self.cli.setattr(
|
||||
'//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput[0]', "text", data[1])
|
||||
# Checking Receiver Address filled or not
|
||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput[0]', '')
|
||||
# ADD SUBJECT
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey this is Demo Subject')
|
||||
# Checking Subject Field is Entered
|
||||
# self.assertExists('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[@text=\"Hey this is Demo Subject\"]', timeout=2)
|
||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', '')
|
||||
# ADD MESSAGE BODY
|
||||
self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]',
|
||||
'text', 'Hey,i am sending message directly from MyAddress book')
|
||||
# Checking Message body is Entered
|
||||
self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', '')
|
||||
# Click on Send Icon
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[2]', timeout=3)
|
||||
self.cli.sleep(2) # Send Messages takes 2 seconds to send message so need to user sleep
|
||||
# Checking Current screen after Send a message
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=3)
|
||||
|
||||
@ordered
|
||||
def test_disable_address(self):
|
||||
"""Disable Addresses"""
|
||||
self.cli.sleep(3)
|
||||
# this is for checking current screen
|
||||
self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=4)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=4)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=4)
|
||||
# this is for scrolling Nav drawer
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# assert for checking scroll function
|
||||
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=4)
|
||||
# self.assertExists('//NavigationItem[@text=\"My addresses\"]', timeout=4)
|
||||
# this is for opening setting screen
|
||||
self.cli.wait_click('//NavigationItem[@text=\"My addresses\"]', timeout=4)
|
||||
# Checking current screen
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=4)
|
||||
# ADDRESS DISABLED
|
||||
self.cli.sleep(1)
|
||||
self.cli.wait_click('//Thumb', timeout=2)
|
||||
self.cli.sleep(5)
|
||||
# is_active = self.cli.getattr('//Thumb', 'active')
|
||||
# print(is_active, '-------------------///////////////////////////////////////////*************/*/*/**/-------------------------*******************------')
|
||||
self.cli.sleep(5)
|
||||
|
||||
# self.assertExists('//ToggleBtn[0]/Thumb[@active=\"False\"]', timeout=2)
|
||||
|
||||
|
||||
# @ordered
|
||||
# def test_show_Qrcode(self):
|
||||
# """Show the Qr code of selected address"""
|
||||
# print("=====================Test -Show QR code of selected address=====================")
|
||||
# # Checking current screen
|
||||
# self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
# # Click on Address to open popup
|
||||
# self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# # Check the Popup is opened
|
||||
# self.assertExists('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[@text=\"Show QR code\"]', timeout=2)
|
||||
# # Cick on 'Show QR code' button to view QR Code
|
||||
# self.cli.wait_click('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[1]/MDLabel[0]')
|
||||
# # Check Current screen is QR Code screen
|
||||
# self.assertExists("//ShowQRCode[@name~=\"showqrcode\"]", timeout=2)
|
||||
# # Click on BACK button
|
||||
# self.cli.wait_click('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]', timeout=2)
|
||||
# # Checking current screen(My Address) after BACK press
|
||||
# self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
|
||||
# @ordered
|
||||
# def test_send_message_from(self):
|
||||
# """Send Message From Send Message From Button"""
|
||||
# print("=====================Test -Send Message From Send Message From Button=====================")
|
||||
# self.cli.sleep(2)
|
||||
# # Checking current screen
|
||||
# self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
# # Click on Address to open popup
|
||||
# self.cli.wait_click('//MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# # Checking Popup Opened
|
||||
# self.assertExists('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[@text=\"Send message from\"]', timeout=2)
|
||||
# # Click on Send Message Button to redirect Create Screen
|
||||
# self.cli.wait_click('//MyaddDetailPopup/BoxLayout[1]/MDRaisedButton[0]/MDLabel[0]', timeout=2)
|
||||
# # Checking Current screen(Create )
|
||||
# self.assertExists("//Create[@name~=\"create\"]", timeout=2)
|
||||
# # Entering Receiver Address
|
||||
# self.cli.setattr(
|
||||
# '//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput[0]', "text", data[1])
|
||||
# # Checking Receiver Address filled or not
|
||||
# self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/RelativeLayout[0]/BoxLayout[0]/MyTextInput[0]', '')
|
||||
# # ADD SUBJECT
|
||||
# self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', 'text', 'Hey this is Demo Subject')
|
||||
# # Checking Subject Field is Entered
|
||||
# # self.assertExists('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[@text=\"Hey this is Demo Subject\"]', timeout=2)
|
||||
# self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/MyMDTextField[0]', '')
|
||||
# # ADD MESSAGE BODY
|
||||
# self.cli.setattr('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]',
|
||||
# 'text', 'Hey,i am sending message directly from MyAddress book')
|
||||
# # Checking Message body is Entered
|
||||
# self.assertNotEqual('//DropDownWidget/ScrollView[0]/BoxLayout[0]/ScrollView[0]/MDTextField[0]', '')
|
||||
# # Click on Send Icon
|
||||
# self.cli.wait_click('//MDActionTopAppBarButton[2]', timeout=3)
|
||||
# self.cli.sleep(2) # Send Messages takes 2 seconds to send message so need to user sleep
|
||||
# # Checking Current screen after Send a message
|
||||
# self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=3)
|
||||
|
||||
# @ordered
|
||||
# def test_disable_address(self):
|
||||
# """Disable Addresses"""
|
||||
# self.cli.sleep(2)
|
||||
# # this is for checking current screen
|
||||
# self.assertExists("//Inbox[@name~=\"inbox\"]", timeout=3)
|
||||
# # this is for opening Nav drawer
|
||||
# self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=2)
|
||||
# # checking state of Nav drawer
|
||||
# self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# # this is for scrolling Nav drawer
|
||||
# self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# # assert for checking scroll function
|
||||
# self.assertExists('//NavigationItem[@text=\"My addresses\"]', timeout=2)
|
||||
# # this is for opening setting screen
|
||||
# self.cli.wait_click('//NavigationItem[@text=\"My addresses\"]', timeout=2)
|
||||
# # Checking current screen
|
||||
# self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
||||
# # ADDRESS DISABLED
|
||||
# self.cli.wait_click('//Thumb', timeout=2)
|
||||
# is_active = self.cli.getattr('//Thumb', 'active')
|
||||
# print(is_active, '--------------------------------------------*******************------')
|
||||
# # self.assertExists('//ToggleBtn[0]/Thumb[@active=\"False\"]', timeout=2)
|
||||
|
||||
# # CLICKING ON DISABLE ACCOUNT TO OPEN POPUP
|
||||
# self.cli.wait_click('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]', timeout=2)
|
||||
# # Checking the pop is Opened
|
||||
# self.assertExists('//MDDialog[@text=\"Address is not currently active. Please click on Toggle button to active it.\"]', timeout=2)
|
||||
# # Clicking on 'Ok' Button To Dismiss the pop
|
||||
# self.cli.wait_click('//MDFlatButton[@text=\"Ok\"]', timeout=2)
|
||||
# # ADDRESS ENABLED
|
||||
# self.cli.wait_click('//Thumb', timeout=2)
|
||||
# # self.assertExists('//Thumb[@active=\"False\"]', timeout=2)
|
||||
# self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=5)
|
||||
# CLICKING ON DISABLE ACCOUNT TO OPEN POPUP
|
||||
self.click_on('//MyAddress/BoxLayout[0]/FloatLayout[0]/MDScrollViewRefreshLayout[0]/MDList[0]/CustomTwoLineAvatarIconListItem[0]', seconds=2)
|
||||
# Checking the pop is Opened
|
||||
self.assertExists('//MDDialog[@text=\"Address is not currently active. Please click on Toggle button to active it.\"]', timeout=2)
|
||||
# Clicking on 'Ok' Button To Dismiss the pop
|
||||
self.click_on('//MDFlatButton[@text=\"Ok\"]', seconds=2)
|
||||
# ADDRESS ENABLED
|
||||
self.click_on('//Thumb', seconds=2)
|
||||
# self.assertExists('//Thumb[@active=\"False\"]', timeout=2)
|
||||
self.assertExists("//MyAddress[@name~=\"myaddress\"]", timeout=2)
|
||||
|
|
|
@ -7,20 +7,17 @@ class NetwrokStatusScreen(TeleniumTestProcess):
|
|||
def test_network_status(self):
|
||||
"""Show NetwrokStatus"""
|
||||
print("=====================Test -Show NetwrokStatus=====================")
|
||||
self.cli.sleep(8)
|
||||
self.cli.sleep(10)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=2)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# this is for scrolling Nav drawer
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
# Assert for checking scroller run till Network tab.
|
||||
self.assertExists("//NavigationItem[@text=\"Network status\"]", timeout=2)
|
||||
# assert for checking scroll function
|
||||
scroll_distance = self.cli.getattr('//ContentNavigationDrawer//ScrollView[0]', 'scroll_y')
|
||||
self.assertCheckScrollDown(scroll_distance, -0.0, timeout=2)
|
||||
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
|
||||
# Clicking on Network Status tab
|
||||
self.click_on('//NavigationItem[@text=\"Network status\"]', seconds=1)
|
||||
self.cli.wait_click('//NavigationItem[@text=\"Network status\"]', timeout=2)
|
||||
# Checking for current screen (Network Status)
|
||||
self.assertExists("//NetworkStat[@name~=\"networkstat\"]", timeout=2)
|
||||
# Clicking on Processes Tab
|
||||
|
|
|
@ -8,17 +8,15 @@ class PaymentScreen(TeleniumTestProcess):
|
|||
def test_select_subscripton(self):
|
||||
"""Select Subscripton From List of Subscriptons"""
|
||||
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
|
||||
self.cli.sleep(7)
|
||||
self.cli.sleep(10)
|
||||
# this is for opening Nav drawer
|
||||
self.cli.wait_click('//MDActionTopAppBarButton[@icon=\"menu\"]', timeout=3)
|
||||
# checking state of Nav drawer
|
||||
self.assertExists("//MDNavigationDrawer[@state~=\"open\"]", timeout=2)
|
||||
# Dragging from sent to inbox to get Payment tab.
|
||||
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||
self.assertExists('//NavigationItem[@text=\"Network status\"]', timeout=3)
|
||||
# assert for checking scroll function
|
||||
scroll_distance = self.cli.getattr('//ContentNavigationDrawer//ScrollView[0]', 'scroll_y')
|
||||
self.assertCheckScrollDown(scroll_distance, 0.0, timeout=3)
|
||||
self.assertCheckScrollDown('//ContentNavigationDrawer//ScrollView[0]', timeout=3)
|
||||
self.assertExists('//NavigationItem[@text=\"Purchase\"]', timeout=3)
|
||||
# this is for opening Payment screen
|
||||
self.click_on('//NavigationItem[@text=\"Purchase\"]', seconds=2)
|
||||
|
@ -28,8 +26,6 @@ class PaymentScreen(TeleniumTestProcess):
|
|||
'//ProductCategoryLayout[0]/ProductLayout[1]',
|
||||
'//ProductCategoryLayout[0]/ProductLayout[0]')
|
||||
# assert for checking scroll function
|
||||
scroll_distance = self.cli.getattr('//Payment//ScrollView[0]', 'scroll_y')
|
||||
self.assertCheckScrollDown(scroll_distance, 0.0, timeout=3)
|
||||
self.assertExists('//MDRaisedButton[3]', timeout=3)
|
||||
self.cli.wait_click('//MDRaisedButton[@text=\"BUY\"]', timeout=2)
|
||||
self.click_on('//ScrollView[0]/ListItemWithLabel[0]', seconds=1)
|
||||
|
|
Reference in New Issue
Block a user