Exemple #1
0
 def weekendtype(self):
     num = mydef.rad_num(1, 5)
     self.click("xpath=>//*[@id='weekendtype']/option[" + num + "]")
     if num != 1:
         weekendprice = mydef.rad_num(60, 200)
         self.clear("id=>weekendprice")
         self.type("id=>weekendprice", weekendprice)
Exemple #2
0
 def cook(self):
     num = mydef.rad_num(1, 3)
     self.click("xpath=>//*[@id='cook']/option[" + num + "]")
     if num == 1:
         num1 = mydef.rad_num(1, 3)
         self.click("xpath=>//*[@id='cookyesorno']/option[" + num1 + "]")
         if num1 == 2:
             cook_price = mydef.rad_num(1, 100)
             self.type("id=>cook_price", cook_price)
Exemple #3
0
 def addbed(self):
     num = mydef.rad_num(1, 3)
     self.click("xpath=>//*[@id='addbed']/option[" + num + "]")
     if num == 1:
         num1 = mydef.rad_num(1, 3)
         self.click("xpath=>//*[@id='addbedyesorno']/option[" + num1 + "]")
         if num1 == 2:
             addbed_price = mydef.rad_num(1, 100)
             self.type("id=>addbed_price", addbed_price)
Exemple #4
0
 def LanguePic(self):
     pic = mydef.rad_num(10, 100)
     self.clear(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[1]/input[1]"
     )
     self.type(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[1]/input[1]",
         pic)
Exemple #5
0
 def LangueSoftOutfit(self, softoutfit):
     softoutfit = mydef.rad_num(10, 20)
     self.clear(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[3]/input[1]"
     )
     self.type(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[3]/input[1]",
         softoutfit)
Exemple #6
0
 def LangueBond(self, Bond):
     Bond = mydef.rad_num(10, 99)
     self.clear(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[2]/input[1]"
     )
     self.type(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[2]/input[1]",
         Bond)
Exemple #7
0
    def test_roomsearch(self):
        '''按房间名搜索'''
        login_page.LoginPage(self.driver).login()
        sleep(2)
        landlord_nav_page.LandlordNavPage(self.driver).Iamlandlord()
        sleep(2)
        landlord_nav_page.LandlordNavPage(self.driver).close_weiChat()
        sleep(2)
        landlord_nav_page.LandlordNavPage(self.driver).settlements()

        po = landlord_roomsearch_page.LandlordRoomsearchPage(self.driver)
        num = mydef.rad_num(2, 3)
        po.lodgeunitid(num)
        sleep(1)
        po.search()
Exemple #8
0
    def test_room_offline(self):
        '''房源下线——下线原因:非我想休息,暂停出租'''
        # login_page.LoginPage(self.driver).login()
        # sleep(2)
        landlord_nav_page.LandlordNavPage(self.driver).Iamlandlord()
        sleep(2)
        # landlord_nav_page.LandlordNavPage(self.driver).close_weiChat()
        # sleep(2)
        landlord_nav_page.LandlordNavPage(self.driver).roommanager()

        po = landlord_offline_page.LandlordOfflinePage(self.driver)
        po.room_offline()
        num = mydef.rad_num(2,9)
        po.offline_reason(num)
        sleep(2)
        po.offlineReasonBtn()
        function.insert_img(self.driver,"offlineSuccess.png")
        print(po.offlineSuccess_text())
        sleep(2)
        po.okOfflineSuccessBtn()
Exemple #9
0
 def publictoiletnum(self):
     self.click("xpath=>//*[@id='publictoiletnum']/option[" +
                mydef.rad_num(1, 12) + "]")
Exemple #10
0
 def alert_details_refuse_reason(self):
     self.click("xpath=>html/body/div[27]/div[2]/div[2]/form/label["+mydef.rad_num(1,9)+"]")
Exemple #11
0
 def roomnum(self):
     self.click("xpath=>//*[@id='roomnum']/option[" + mydef.rad_num(1, 11) +
                "]")
Exemple #12
0
 def parlor(self):
     self.click("xpath=>//*[@id='parlor']/option[" + mydef.rad_num(1, 12) +
                "]")
Exemple #13
0
 def bunk_bed(self):
     self.click("xpath=>//*[@id='双层床']/option[" + mydef.rad_num(1, 12) +
                "]")
 def Budget(self):
     n = mydef.rad_num(100, 999)
     self.type(
         "xpath=>//*[@id='right-box']/div/div[2]/form/div/div[8]/div/div/form/div[7]/div/div/div/div/input",
         n)
Exemple #15
0
 def OwnerRoomNum(self):
     num = mydef.rad_num(1,999)
     self.type("xpath=>//*[@id='house_num']",num)
Exemple #16
0
 def SoftDeposit(self):
     deposit = mydef.rad_num(1, 1000)
     self.type(
         "xpath=>//*[@id='pane-softagreemt']/div/div[1]/form/div[2]/div/div/input",
         deposit)
Exemple #17
0
 def LangueCleaningFee(self):
     cleaningfee = mydef.rad_num(1, 99)
     self.type(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[7]/input",
         cleaningfee)
Exemple #18
0
 def cookhouse(self):
     self.click("xpath=>//*[@id='cookhouse']/option[" +
                mydef.rad_num(1, 12) + "]")
Exemple #19
0
 def privatetoiletnum(self):
     self.click("xpath=>//*[@id='privatetoiletnum']/option[" +
                mydef.rad_num(2, 12) + "]")
Exemple #20
0
 def balcony(self):
     self.click("xpath=>//*[@id='balcony']/option[" + mydef.rad_num(1, 12) +
                "]")
Exemple #21
0
 def LangueDesignFee(self, designfee):
     designfee = mydef.rad_num(1, 2000)
     self.type(
         "xpath=>//*[@id='pane-bsJoinagreemt']/div/div[4]/div[4]/div/div[5]/input[1]",
         designfee)
Exemple #22
0
 def guestnum(self):
     self.click("xpath=>//*[@id='guestnum']/option[" +
                mydef.rad_num(2, 11) + "]")
Exemple #23
0
 def SoftPic(self):
     pic = mydef.rad_num(1, 1000)
     self.type(
         "xpath=>//*[@id='pane-softagreemt']/div/div[3]/form/div[2]/div/div/input",
         pic)
Exemple #24
0
 def big_bed(self):
     self.click("xpath=>//*[@id='双人床(大,宽2m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
Exemple #25
0
 def UpgradeCost(self):
     cost = mydef.rad_num(1, 10)
     self.type(
         "xpath=>//*[@id='pane-softagreemt']/div/div[7]/form/div[3]/div[1]/div/div/input",
         cost)
Exemple #26
0
 def middle_bed(self):
     self.click("xpath=>//*[@id='双人床(中,宽1.8m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
Exemple #27
0
 def OwnerResidence(self):
     i = mydef.rad_num(1,6)
     self.click("xpath=>//*[@id='indexPage']/div[6]/div[2]/div[1]/div[5]/div/ul/li["+ i +"]/span")
Exemple #28
0
 def small_bed(self):
     self.click("xpath=>//*[@id='双人床(小,宽1.5m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
Exemple #29
0
 def people(self):
     people = mydef.rad_num(1, 10)
     self.type(
         "xpath=>html/body/form/div[2]/div[1]/div[1]/div/div/dl[3]/dd/input[2]",
         people)
Exemple #30
0
 def single_bed(self):
     self.click("xpath=>//*[@id='单人床']/option[" + mydef.rad_num(1, 12) +
                "]")