本文整理汇总了Python中PublicFunctions.my_wait_element方法的典型用法代码示例。如果您正苦于以下问题:Python PublicFunctions.my_wait_element方法的具体用法?Python PublicFunctions.my_wait_element怎么用?Python PublicFunctions.my_wait_element使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PublicFunctions
的用法示例。
在下文中一共展示了PublicFunctions.my_wait_element方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Brand
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Brand(self,value):
PublicFunctions.my_wait_element(self,"//div[@id='LayoutColumn1']/div[2]/div[2]/ul[1]/li[2]/img")
if PublicFunctions.my_wait_element(self,"//input[@name=\'%s\']" %value) is False:
self.selenium.click("//div[@id='LayoutColumn1']/div[2]/div[2]/ul[1]/li[2]/img")
self.selenium.click("//div[@id='LayoutColumn1']/div[2]/div[2]/ul[1]/li[2]/img")
PublicFunctions.my_wait_element(self,"//input[@name=\'%s\']" %value)
self.selenium.click("//input[@name=\'%s\']" %value)
示例2: TwoSeries_select
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def TwoSeries_select(self,link1,link2):
PublicFunctions.my_wait_element(self,link1)
self.selenium.click(link1)
PublicFunctions.my_wait_element(self,link2)
self.selenium.click(link2)
PublicFunctions.my_wait_element(self,"//div[@id='HomeNewProducts']/div[4]/div[1]/a[1]")
self.selenium.click("//div[@id='HomeNewProducts']/div[4]/div[1]/a[1]")
示例3: TwoSubCategories_select
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def TwoSubCategories_select(self, alt1, alt2):
PublicFunctions.my_wait_element(self,"//img[@alt=\'%s\']" % alt1)
self.selenium.click("//img[@alt=\'%s\']" % alt1)
PublicFunctions.my_wait_element(self,"//img[@alt=\'%s\']" % alt2)
self.selenium.click("//img[@alt=\'%s\']" % alt2)
PublicFunctions.my_wait_element(self,"//div[@id='FavoriteDivPar']/div[1]/a[1]")
self.selenium.click("//div[@id='FavoriteDivPar']/div[1]/a[1]")
示例4: setUp
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def setUp(self):
self.verificationErrors = []
self.selenium = selenium("localhost", 4444, "*chrome", "http://dev.lofinc.net/")
self.selenium.start()
self.selenium.set_timeout("0")
sel=self.selenium
sel.open("/")
for i in range(0, 30):
if self.selenium.is_element_present("login_email") == True:
self.selenium.type("login_email","[email protected]")
self.selenium.type("login_pass","123456")
self.selenium.click("LoginButton")
else :
time.sleep(1)
PublicFunctions.my_wait_element(self,"side_selected_year")
a1=self.selenium.get_text("side_selected_year")
a2=self.selenium.get_text("side_selected_make")
a3=self.selenium.get_text("side_selected_brand")
a4=self.selenium.get_text("side_selected_category")
if (a1 or a2 or a3 or a4) == "" :
return True
else:
FunctionCommon.Clear(self,"all")
示例5: Products_ViewDetail
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Products_ViewDetail(self):
# PublicFunctions.my_wait_element(self,("//div[@id='ProductDetails']/div/form/div/dl[2]/dd/div/input"))
# self.selenium.click("//div[@id='ProductDetails']/div/form/div/dl[2]/dd/div/input")
PublicFunctions.my_wait_element(self,"//img[contains(@src,'/templates/default/images/view.gif')]")
self.selenium.click("//img[contains(@src,'/templates/default/images/view.gif')]")
示例6: Series_options
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Series_options(self,series):
PublicFunctions.my_wait_element(self,"link=%s" % series)
self.selenium.click("link=%s" % series)
示例7: Login
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Login(self, username, password):
PublicFunctions.my_wait_element(self,"login_email")
self.selenium.type("login_email",username)
self.selenium.type("login_pass",password)
self.selenium.click("LoginButton")
示例8: Step5_PaymentDetails
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Step5_PaymentDetails(self):
PublicFunctions.my_wait_element(self,"//div[@id='CheckoutStepPaymentDetails']/div[1]/form[1]/div[1]/dl[1]/dd[11]/p/input")
self.selenium.type("//div[@id='CheckoutStepPaymentDetails']/div[1]/form[1]/div[1]/dl[1]/dd[2]/div[1]/input","4111111111111111")
self.selenium.click("//div[@id='CheckoutStepPaymentDetails']/div[1]/form[1]/div[1]/dl[1]/dd[11]/p/input")
示例9: Step3_ShippingMethod
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Step3_ShippingMethod(self):
PublicFunctions.my_wait_element(self,"//input[@value='Free Customer Pickup']")
self.selenium.click("//input[@value='Free Customer Pickup']")
示例10: Browser
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Browser(self):
PublicFunctions.my_wait_element(self,"//input[@class='searchBtn']")
self.selenium.click("//input[@class='searchBtn']")
示例11: Step3_ShippingMethod
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Step3_ShippingMethod(self):
PublicFunctions.my_wait_element(self,"//div[@id='CheckoutStepShippingProvider']/div[1]/form[1]/ul/li/label/input")
self.selenium.click("//div[@id='CheckoutStepShippingProvider']/div[1]/form[1]/ul/li/label/input")
self.selenium.click("//div[@id='CheckoutStepShippingProvider']/div[1]/form[1]/div[2]/input")
示例12: SubCategories_options
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def SubCategories_options(self,catesValue,subcatesValue):
sel.click("//ul[@id='FavBrands']/li[%s]/a[1]/img" % catesValue)
PublicFunctions.my_wait_element(self,"//input[@name=\'%s\']" %subcatesValue)
sel.click("//input[@value=\'%s\']" % subcatesValue)
示例13: Categories_QP
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def Categories_QP(self,value):
PublicFunctions.my_wait_element(self,"//input[@name=\'%s\']" %value)
self.selenium.click("//input[@name=\'%s\']" %value)
示例14: AddCart
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def AddCart(self):
PublicFunctions.my_wait_element(self,"//input[@type='image' and @onclick='return chksubmit()']")
self.selenium.click("//input[@type='image' and @onclick='return chksubmit()']")
示例15: UpdateQty
# 需要导入模块: import PublicFunctions [as 别名]
# 或者: from PublicFunctions import my_wait_element [as 别名]
def UpdateQty(self,qty):
PublicFunctions.my_wait_element(self,"qty_0")
self.selenium.type("qty_0",qty)
self.selenium.click("//input[@value='Recalculate']")
self.selenium.wait_for_page_to_load("30000")