Test Cases [reduced xpath]
This commit is contained in:
parent
fddd054d56
commit
60b4f9a180
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Current File",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -7,19 +7,19 @@ class PaymentScreen(TeleniumTestProcess):
|
||||||
def test_select_subscripton(self):
|
def test_select_subscripton(self):
|
||||||
"""Select Subscripton From List of Subscriptons"""
|
"""Select Subscripton From List of Subscriptons"""
|
||||||
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
|
print("=====================Test -Select Subscripton From List of Subscriptons=====================")
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(10)
|
||||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
# this is for opening Nav drawer
|
||||||
self.cli.sleep(3)
|
self.click_on('//MDActionTopAppBarButton[@icon=\"menu\"]')
|
||||||
self.cli.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]", 1)
|
# Dragging from sent to inbox to get Payment tab.
|
||||||
self.cli.sleep(3)
|
self.drag("//NavigationItem[@text=\"Sent\"]", "//NavigationItem[@text=\"Inbox\"]")
|
||||||
self.cli.click_on('//NavigationItem[8]')
|
# this is for opening Payment screen
|
||||||
|
self.click_on('//NavigationItem[@text=\"Purchase\"]', seconds=1)
|
||||||
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
|
self.assertExists("//Payment[@name~=\"payment\"]", timeout=2)
|
||||||
self.cli.sleep(3)
|
|
||||||
self.cli.drag(
|
self.cli.drag(
|
||||||
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
|
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[1]',
|
||||||
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[0]', 1)
|
'//Payment/BoxLayout[0]/ScrollView[0]/BoxLayout[0]/ProductCategoryLayout[0]/ProductLayout[0]', 1)
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//MDRaisedButton[3]')
|
self.click_on('//MDRaisedButton[3]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
self.cli.click_on('//ListItemWithLabel[0]')
|
self.cli.click_on('//ListItemWithLabel[0]')
|
||||||
self.cli.sleep(2)
|
self.cli.sleep(2)
|
||||||
|
|
|
@ -7,21 +7,25 @@ class TrashMessage(TeleniumTestProcess):
|
||||||
def test_delete_trash_message(self):
|
def test_delete_trash_message(self):
|
||||||
"""Delete Trash message permanently from trash message listing"""
|
"""Delete Trash message permanently from trash message listing"""
|
||||||
print("=====================Test -Delete Message From Trash Message Listing=====================")
|
print("=====================Test -Delete Message From Trash Message Listing=====================")
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(8)
|
||||||
self.cli.click_on('//MDToolbar/BoxLayout[0]/MDActionTopAppBarButton[0]')
|
# this is for opening Nav drawer
|
||||||
self.cli.sleep(4)
|
self.click_on('//MDActionTopAppBarButton[@icon=\"menu\"]')
|
||||||
self.cli.click_on('//NavigationItem[4]')
|
# checking state of Nav drawer
|
||||||
|
self.assertEqual(self.cli.getattr('//MDNavigationDrawer', 'state'), 'open')
|
||||||
|
# this is for opening Trash screen
|
||||||
|
self.click_on('//NavigationItem[@text=\"Trash\"]')
|
||||||
|
# self.cli.click_on('//NavigationItem[4]')
|
||||||
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
self.assertExists("//Trash[@name~=\"trash\"]", timeout=2)
|
||||||
self.cli.sleep(4)
|
self.cli.sleep(4)
|
||||||
self.cli.drag(
|
# This is for swiping message to activate delete icon.
|
||||||
'//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
self.drag(
|
||||||
'//MDList[0]/CutsomSwipeToDeleteItem[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]', 1)
|
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[1]',
|
||||||
self.cli.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]')
|
'//Trash[0]//TwoLineAvatarIconListItem[0]/BoxLayout[2]')
|
||||||
self.cli.sleep(4)
|
self.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]', seconds=1)
|
||||||
self.cli.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[0]')
|
# clicking on Trash Box icon to delete message.
|
||||||
self.cli.sleep(2)
|
self.click_on('//MDList[0]/CutsomSwipeToDeleteItem[0]//MDIconButton[0]', seconds=2)
|
||||||
self.cli.click_on('//MDDialog/MDCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
|
# Clicking on 'Yes' Button on Popup to confirm delete.
|
||||||
|
self.click_on('//MDDialog//MDFlatButton[@text=\"Yes\"]', seconds=1.1)
|
||||||
# self.cli.click_on('//MDDialog/DialogFakeCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
|
# self.cli.click_on('//MDDialog/DialogFakeCard[0]/AnchorLayout[0]/MDBoxLayout[0]/MDFlatButton[0]')
|
||||||
self.cli.sleep(2)
|
|
||||||
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
total_trash_msgs = len(self.cli.select("//CutsomSwipeToDeleteItem"))
|
||||||
self.assertEqual(total_trash_msgs, 1)
|
self.assertEqual(total_trash_msgs, 1)
|
||||||
|
|
Reference in New Issue
Block a user