def setUpClass(self): self.Log=test_Configuration_information.LogConfig.Log self.Log.info("=====Start baidu_select_test=====") #get case config self.site = test_Configuration_information.site self.platform = test_Configuration_information.platform self.baseurl = test_Configuration_information.UrlConfig.baseurl #Get PageOperation Function self.PageOperation = test_UIbase.PageOperation() #start driver self.driver = self.PageOperation.ChoseDriver(self.platform) self.verificationErrors = [] self.accept_next_alert = True self.driver.get(self.baseurl)
def setUpClass(self): self.Log=test_Configuration_information.LogConfig.Log self.Log.info("=====Start aut_3839_GRKHZLCJ_test=====") #get case config self.site = test_Configuration_information.site self.platform = test_Configuration_information.platform self.base_url = test_Configuration_information.UrlConfig.base_url self.city_code = test_Configuration_information.CityConfig.city_code self.op_code_check_tag = test_Configuration_information.checkTag.QuickSearch #Get PageOperation Function self.PageOperation = test_UIbase.PageOperation() #start driver self.driver = self.PageOperation.ChoseDriver(self.platform) self.verificationErrors = [] self.accept_next_alert = True self.driver.get(self.base_url) #login user_name=test_Configuration_information.userName(self.city_code) user_password=test_Configuration_information.userPwd(self.city_code) public_operation.loginCRM(self.driver,user_name,user_password)
import json, time from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from public import test_UIbase from testcases.demo.conf import test_Configuration_information from selenium.webdriver.common.keys import Keys from testcases.HLJ_CRM60.operation import public_operation PageOperation = test_UIbase.PageOperation() # Log=test_Configuration_information.LogConfig.Log def marketExe(driver, data): #获取测试数据 testData = json.loads(data) print("进到market执行函数了") # PageOperation.SwitchOutIframe(driver) #输入数据 # print("已经执行了切换frame") # frame = driver.find_element_by_xpath('//*[@id="J_opIframeBox"]/div[2]/div[2]/div/iframe') # print("frame",frame) # webdriver.Chrome().switch_to.frame(frame) # print("大哥我过去了1") # driver.execute_script("window.scrollTo(0, document.body.scrollHeight)") # print("大哥我过去了2") PageOperation.InsertData(driver, '20元感恩包五折购', 'input', 'name', 'qry_search') PageOperation.ClickButton( driver, 'span', 'class',