コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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()
コード例 #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()
コード例 #9
0
 def publictoiletnum(self):
     self.click("xpath=>//*[@id='publictoiletnum']/option[" +
                mydef.rad_num(1, 12) + "]")
コード例 #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)+"]")
コード例 #11
0
 def roomnum(self):
     self.click("xpath=>//*[@id='roomnum']/option[" + mydef.rad_num(1, 11) +
                "]")
コード例 #12
0
 def parlor(self):
     self.click("xpath=>//*[@id='parlor']/option[" + mydef.rad_num(1, 12) +
                "]")
コード例 #13
0
 def bunk_bed(self):
     self.click("xpath=>//*[@id='双层床']/option[" + mydef.rad_num(1, 12) +
                "]")
コード例 #14
0
 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)
コード例 #15
0
 def OwnerRoomNum(self):
     num = mydef.rad_num(1,999)
     self.type("xpath=>//*[@id='house_num']",num)
コード例 #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)
コード例 #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)
コード例 #18
0
 def cookhouse(self):
     self.click("xpath=>//*[@id='cookhouse']/option[" +
                mydef.rad_num(1, 12) + "]")
コード例 #19
0
 def privatetoiletnum(self):
     self.click("xpath=>//*[@id='privatetoiletnum']/option[" +
                mydef.rad_num(2, 12) + "]")
コード例 #20
0
 def balcony(self):
     self.click("xpath=>//*[@id='balcony']/option[" + mydef.rad_num(1, 12) +
                "]")
コード例 #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)
コード例 #22
0
 def guestnum(self):
     self.click("xpath=>//*[@id='guestnum']/option[" +
                mydef.rad_num(2, 11) + "]")
コード例 #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)
コード例 #24
0
 def big_bed(self):
     self.click("xpath=>//*[@id='双人床(大,宽2m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
コード例 #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)
コード例 #26
0
 def middle_bed(self):
     self.click("xpath=>//*[@id='双人床(中,宽1.8m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
コード例 #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")
コード例 #28
0
 def small_bed(self):
     self.click("xpath=>//*[@id='双人床(小,宽1.5m左右)']/option[" +
                mydef.rad_num(1, 12) + "]")
コード例 #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)
コード例 #30
0
 def single_bed(self):
     self.click("xpath=>//*[@id='单人床']/option[" + mydef.rad_num(1, 12) +
                "]")