Beispiel #1
0
 def choose_baby_category(self):
     # 输入关键词搜索,选中女装类目
     init_element(self.baby_category_locator).click()
     sleep(5)
     ReleaseCommonMethods().search_keyword('女装/女士精品>>连衣裙',
                                           poco(text="女装/女士精品>>连衣裙"))
     locate_by_anchor(poco(text="保证金1000/订单险/账期保障"), 1, 'l0').click()
Beispiel #2
0
 def place_and_store_category(self):
     # 切换回基本信息
     init_element(self.basic_information_locator).click()
     BasePage().page_swipe_buttom()
     # init_element(self.place_locator).click()
     init_element(self.store_category_locator).click()
     locate_by_anchor(poco(text="一级分类00"), 2, 'l0l0').click()
     poco(text="确定").click()
 def choose_products(self):
     # 等待页面跳转成功
     init_element(self.choose_products_locator).wait_for_appearance(10)
     # 点击'+'
     locate_by_anchor(init_element(self.choose_products_locator), 1,
                      'v0').click()
     # 搜索宝贝,点击'复制宝贝'
     CommonList().search_by_keyword('测试宝贝不发货', poco(text='测试宝贝不发货不发货'))
     poco(text='测试宝贝不发货不发货').click()
     init_element(self.copy_baby_button).click()
Beispiel #4
0
 def add_year_season(self):
     init_element(self.year_season_locator).wait_for_appearance(8)
     init_element(self.year_season_locator).click()
     # 显性等待跳转到宝贝属性页面
     init_element(self.baby_attribute_locator).wait_for_appearance(8)
     init_element(self.year_season_locator).click()
     poco(text="2016年冬季").click()
     init_element(self.article_number_locator).wait_for_appearance(8)
     locate_by_anchor(init_element(self.article_number_locator), 2,
                      'l1l0l0').set_text('00123')
     init_element(self.save_locator).click()
 def set_time(self):
     # 打开日历
     locate_by_anchor(init_element(self.starting_time_locator), 1,
                      'l1l1').click()
     # 点击确定
     poco(text="确定").click()
     # 切换到输入模式,获取分钟的文本信息,基础上加2分钟,如果到58时,则获取小时的文本,基础上加1小时
     init_element(self.input_pattern).click()
     minute1 = init_element(self.minute_locator).get_text()
     if int(minute1) == 58:
         hour1 = init_element(self.hour_locator).get_text()
         hour2 = int(hour1) + 1
         element_sendtext(self.hour_locator, hour2)
         # 点击确定
         poco(name="android:id/button1").click()
     else:
         minute2 = int(minute1) + 2
         element_sendtext(self.minute_locator, minute2)
         # 点击确定
         poco(name="android:id/button1").click()
Beispiel #6
0
 def price_and_quantity(self):
     poco('android.widget.RelativeLayout').swipe('down')
     # BasePage().page_swipe_buttom02()
     init_element(self.fixed_price_locator).click()
     poco(text='设置规格').wait_for_appearance(8)
     # 选择尺码
     init_element(self.choose_size_locator).click()
     poco(text="145/52A").click()
     poco(text="155/60A").click()
     poco(text='确定').click()
     init_element(self.choose_size_locator).invalidate()
     # 选择颜色
     sleep(3)
     init_element(self.choose_color_locator).click()
     poco(text="乳白色").click()
     poco(text="米白色").click()
     init_element(self.sure2_locator).click()
     # 批量填充价格和库存
     poco(text="批量填充").invalidate()
     poco(text="批量填充").click()
     locate_by_anchor(poco(text='价格'), 1, 'l1l0l0').set_text('10000000')
     locate_by_anchor(poco(text='库存'), 1, 'l1l0l0').set_text('999')
     poco(text="确认").click()
     poco(text="确定").click()
Beispiel #7
0
 def edit_baby_title(self):
     locate_by_anchor(init_element(self.baby_title_locator), 2,
                      'v1v0v0v0v0').set_text('女装,发布宝贝测试用')
Beispiel #8
0
 def add_details_description(self):
     init_element(self.details_description_locator).click()
     init_element(self.add_text_locator).click()
     locate_by_anchor(poco(text='取消'), 2,
                      'v0v0v0v0').set_text('发布宝贝测试,不发货不发货不发货不发货不发货......')
     poco(text="确定").click()
 def pat_increase_page(self):
     locate_by_anchor(poco(text='增价拍'), 2, 'v3v1').click()
 def arbitrary_drop_page(self):
     locate_by_anchor(poco(text='任意降'), 2, 'v3v1').click()
 def get_amount_in_warehouse(self):
     in_warehouse_quantity = locate_by_anchor(
         init_element(self.in_warehouse_locator2), 1, 'v0').get_text()
     print('创建活动仓库中的数量:', in_warehouse_quantity)
     return in_warehouse_quantity
 def get_amount_in_shots(self):
     in_shooting_quantity = locate_by_anchor(
         init_element(self.in_shooting_locator), 1, 'v0').get_text()
     print('创建活动开拍中的数量:', in_shooting_quantity)
     return in_shooting_quantity
 def get_amount_in_preview(self):
     pre_creation_quantity = locate_by_anchor(
         init_element(self.in_preview_locator), 1, 'v0').get_text()
     print('创建活动预展中的数量:', pre_creation_quantity)
     return pre_creation_quantity