Exemplo n.º 1
0
 def test_enterInitialCash(self):
     cl.allureLogs("App Opened")
     self.cf.clickAllowBtn1()
     self.cf.clickAllowBtn2()
     try:
         self.cf.clickCloudMode()
         self.cf.selectServer()
         self.cf.selectTestServer()
         self.cf.testServerSubmit()
     except Exception as e:
         print(e)
     self.cf.enterLicenseKey()
     self.driver.hide_keyboard()
     self.cf.LicenseSubmitBtn()
     self.gt.verifyLoginScreen()
     self.gt.enterUsername()
     self.gt.enterPassword()
     self.gt.clickLoginSubmitBtn()
     self.ip.enterInitialCash()
     self.ip.clickICSubmitBtn()
Exemplo n.º 2
0
 def test_PrintBills_TC1(self):
     cl.allureLogs("Testcase1 executing....App Opened")
     # self.cf.clickAllowBtn1()
     # self.cf.clickAllowBtn2()
     try:
         self.cf.clickCloudMode()
         self.cf.selectServer()
         self.cf.selectTestServer()
         self.cf.testServerSubmit()
     except Exception as e:
         print(e)
     # self.cf.enterLicenseKey()
     # self.driver.hide_keyboard()
     # self.cf.LicenseSubmitBtn()
     # time.sleep(20)
     # self.gt.verifyLoginScreen()
     # self.gt.enterUsername()
     # self.gt.enterPassword()
     # self.gt.clickLoginSubmitBtn()
     # self.ip.enterInitialCash()
     # self.ip.clickICSubmitBtn()
     self.gt.launchOK()
     self.ph.clickOnPOS()
     for i in range(0, 5000, 1):
         self.validatetext = "Paper is not available."
         self.ps.clickOnitem1()
         self.ps.clickOnitem2()
         time.sleep(1)
         self.ps.clickOnTotalAmount()
         self.pb.clickOnPrintBill()
         try:
             if self.validatetext in self.driver.find_element_by_id(
                     "android:id/message").text:
                 time.sleep(20)
                 el2 = self.driver.find_element_by_id(
                     "android:id/button1")  # click on ok btn
                 el2.click()
                 self.ps.clickOnTotalAmount()
                 self.pb.clickOnPrintBill()
         except Exception as e:
             print(e)
         time.sleep(7)
         print(i)
         cl.allureLogs(i)
     cl.allureLogs("Finished Printing 200 bills. Testcase1 completed")
Exemplo n.º 3
0
 def clickTransSubmitBtn(self):
     self.clickElement(self._TransSubmitBtn, "id")
     cl.allureLogs("Clicked on Transaction submit button")
Exemplo n.º 4
0
 def enterAuditPassword(self):
     self.sendText("1234", self._password, "id")
     cl.allureLogs("Entered audit user password")
Exemplo n.º 5
0
 def clickInitialCashBtn(self):
     self.clickElement(self._cancelInitialCash, "id")
     cl.allureLogs("Click on cancel initial cash Button")
Exemplo n.º 6
0
 def verifyLoginScreen(self):
     loginScreen = self.isDisplayed(self._username, "id")
     assert loginScreen == True
     cl.allureLogs("Opened login Screen")
Exemplo n.º 7
0
 def enterPassword2(self):
     self.sendText("admin12344", self._password, "id")
     cl.allureLogs("Entered Invalid Password")
Exemplo n.º 8
0
 def enterUsername(self):
     self.sendText("admin90", self._username, "id")
     cl.allureLogs("Entered username")
Exemplo n.º 9
0
 def testServerSubmit(self):
     self.clickElement(self._TestServerSubmit, "id")
     cl.allureLogs("Clicked on Test server submit button")
Exemplo n.º 10
0
 def clickOnitem2(self):
     self.clickElement(self._item2, "xpath")
     cl.allureLogs("Clicked on item2")
Exemplo n.º 11
0
 def test_allowPermission(self):
     cl.allureLogs("App Launched")
     self.cf.clickAllowBtn1()
     self.cf.clickAllowBtn2()
Exemplo n.º 12
0
 def clickBillInHoldList(self):
     self.clickElement(self._billInHoldList, "xpath")
     # bill[0].click()
     cl.allureLogs("Clicked bill in hold list")
Exemplo n.º 13
0
 def clickHoldSaveBtn(self):
     self.clickElement(self._holdSaveBtn, "id")
     cl.allureLogs("Clicked on Hold save button")
Exemplo n.º 14
0
 def clickOnHoldIcon(self):
     self.clickElement(self._holdIcon, "id")
     cl.allureLogs("Clicked on Hold Icon")
Exemplo n.º 15
0
 def clickOnSideBar(self):
     self.clickElement(self._sidebar, "id")
     cl.allureLogs("Clicked on side bar")
Exemplo n.º 16
0
 def selectServer(self):
     self.clickElement(self._SelectServer, "id")
     cl.allureLogs("Click on select server to select a server")
Exemplo n.º 17
0
 def selectTestServer(self):
     self.clickElement(self._SelectTestServer, "xpath")
     cl.allureLogs("Selected Test Server option")
Exemplo n.º 18
0
 def clickOnTotalAmount(self):
     self.clickElement(self._totalAmount, "id")
     cl.allureLogs("Clicked on totalAmount")
Exemplo n.º 19
0
 def enterInitialCash(self):
     self.sendText("100", self._enterInitialCash, "id")
     cl.allureLogs("Entered initial cash")
Exemplo n.º 20
0
 def clickICSubmitBtn(self):
     self.clickElement(self._submitInitialCashBtn, "id")
     cl.allureLogs("Click on Initial cash submit Button")
Exemplo n.º 21
0
 def enterPassword(self):
     self.sendText("1234", self._password, "id")
     cl.allureLogs("Entered password")
Exemplo n.º 22
0
 def clickAllowBtn2(self):
     self.clickElement(self._allowBtn2, "id")
     cl.allureLogs("Clicked on allow button 1")
Exemplo n.º 23
0
 def clickLoginSubmitBtn(self):
     self.clickElement(self._submitLoginBtn, "id")
     cl.allureLogs("Click on Login Button")
Exemplo n.º 24
0
 def enterLicenseKey(self):
     self.sendText("KXJJETT3", self._LicenseKey, "id")
     cl.allureLogs("Entered License Key")
Exemplo n.º 25
0
 def verifyInitialcashTitle(self):
     initialpageScreen = self.isDisplayed(self._initialCashTitle, "text")
     assert initialpageScreen == True
     cl.allureLogs("Opened Initial Cash Page")
Exemplo n.º 26
0
 def LicenseSubmitBtn(self):
     self.clickElement(self._LicenseSubmitBtn, "id")
     cl.allureLogs("Submitted License Key")
Exemplo n.º 27
0
 def enterAuditUsername(self):
     self.sendText("audit96a", self._username, "id")
     cl.allureLogs("Entered audit username")
Exemplo n.º 28
0
 def clickCloudMode(self):
     self.clickElement(self._cloudMode, "id")
     cl.allureLogs("Clicked on cloud mode")
Exemplo n.º 29
0
 def launchOK(self):
     self.clickElement(self._launchOK, "id")
     time.sleep(1)
     cl.allureLogs(
         "once app launch click on OK to continue with the users shift")
Exemplo n.º 30
0
 def enterTransactionId(self):
     self.sendText("1234", self._TransactionEditBox, "id")
     cl.allureLogs("Entered transaction id")