本文整理汇总了Python中PF_common类的典型用法代码示例。如果您正苦于以下问题:Python PF_common类的具体用法?Python PF_common怎么用?Python PF_common使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PF_common类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PF_SearchHistoryOn_AllowedToMostPrivate_416
def PF_SearchHistoryOn_AllowedToMostPrivate_416(log_file):
search_history_on_allowed=("allowed.png")
search_history_on_allowed_mouseover=("mouseover.png")
search_history_on_allowed_click=("mouseoverclick.png")
top_bar=("topbar.png")
turn_on=("turn_on.png")
turn_off=("turnoff.png")
fixes_icon=("fixes.png")
search_history_most_private=("green.png")
PF_common.verify(log_file, search_history_on_allowed)
hover(search_history_on_allowed)
PF_common.verify(log_file, search_history_on_allowed_mouseover)
hover(search_history_on_allowed)
sleep(1)
click(search_history_on_allowed_click)
sleep(5)
PF_common.verify(log_file, top_bar)
click(turn_off)
sleep(1)
PF_common.verify(log_file, turn_on)
click(fixes_icon)
sleep(5)
PF_common.verify(log_file, search_history_most_private)
示例2: PF_SearchHistoryOn_OrangeToAllowed_421
def PF_SearchHistoryOn_OrangeToAllowed_421(log_file):
search_history_on_orange=("orange.png")
search_history_on_orange_mouseover=("orange_hover.png")
search_history_fix=("orange_click.png")
top_bar=("top_bar.png")
turn_off=("turn_off.png")
fixes_icon=("Fixes.png")
search_history_allowed=("Gray.png")
PF_common.verify(log_file, search_history_on_orange)
hover(search_history_on_orange)
PF_common.verify(log_file, search_history_on_orange_mouseover)
#hover(search_history_on_orange)
sleep(1)
click(search_history_fix)
sleep(5)
PF_common.verify(log_file, top_bar)
PF_common.verify(log_file, turn_off)
click(fixes_icon)
sleep(5)
PF_common.verify(log_file, search_history_allowed)
示例3: PF_WebApp_FB06_AppAccessOn_GreyToGreen_1343
def PF_WebApp_FB06_AppAccessOn_GreyToGreen_1343(log_file):
apps_access_grey=("apps_access_grey.png")
apps_access_gray_mouseover=("apps_access_gray_mouseover.png")
apps_access_grey_fix=("apps_access_grey_fix.png")
top_bar=("top_bar.png")
fixes_icon=("fixes_icon.png")
checkbox=("checkbox.png")
save=("save.png")
app_access_green=("app_access_green.png")
PF_common.verify(log_file, apps_access_grey)
hover(apps_access_grey)
PF_common.verify(log_file, apps_access_gray_mouseover)
click(apps_access_grey_fix)
PF_common.verify(log_file, top_bar)
sleep(1)
PF_common.verify(log_file,checkbox)
while exists(checkbox):
click(checkbox)
sleep(2)
click(save)
sleep(2)
click(fixes_icon)
PF_common.verify(log_file, app_access_green)
示例4: PF_SearchHistoryOff_MostPrivateToAllowed_419
def PF_SearchHistoryOff_MostPrivateToAllowed_419(log_file):
search_history_off=("green.png")
search_history_off_mouseover=("green_hover.png")
search_history_off_click=("green_click.png")
top_bar=("top_bar.png")
turn_on=("turnon.png")
turn_off=("turnoff.png")
fixes_icon=("fixes.png")
search_history_on_allowed=("gray.png")
PF_common.verify(log_file,search_history_off)
hover(search_history_off)
PF_common.verify(log_file,search_history_off_mouseover)
sleep(1)
#hover(search_history_off)
sleep(1)
click(search_history_off_click)
sleep(5)
PF_common.verify(log_file, top_bar)
click(turn_on)
sleep(1)
PF_common.verify(log_file, turn_off)
click(fixes_icon)
sleep(5)
PF_common.verify(log_file, search_history_on_allowed)
示例5: PF_WebApp_LK01_ProfileVisitsVisible_OrangeToGrey_1326
def PF_WebApp_LK01_ProfileVisitsVisible_OrangeToGrey_1326(log_file):
ProfileVisitsVisible_orange=("1404727138623.png")
ProfileVisitsVisible_hover=("1404727159153.png")
top_bar=("1404727284774.png")
ProfileVisitsVisible_settings=("1404727312893.png")
fix_icon=("1404727339586.png")
ProfileVisitsVisible_allowed=("1404736556388.png")
#verify the above images
#print str(fix_icon)
PF_common.verify(log_file,ProfileVisitsVisible_orange)
hover(ProfileVisitsVisible_orange)
PF_common.verify(log_file,ProfileVisitsVisible_hover)
click(Pattern(ProfileVisitsVisible_hover).similar(0.50).targetOffset(0,-5))
sleep(3)
PF_common.ifPassword(log_file)
PF_common.verify(log_file,top_bar)
#PF_common.verify(log_file,ProfileVisitsVisible_settings)
click(fix_icon)
PF_common.verify(log_file,ProfileVisitsVisible_allowed)
示例6: FixGoogleSection
def FixGoogleSection(log_file):
PF_common.GoogleLogin(log_file)
if PF_common.verify_continue_with_similarity(log_file,"1404474658234.png",0.95)==0:
PF_common.write_log_with_screenshot(log_file,"Google section is not orange")
rs=7
if exists(Pattern(GL01_green).similar(0.90)):set_GL01_grey(log_file);rs=7
if exists(Pattern(GL02_green).similar(0.90)):set_GL02_grey(log_file);rs=7
if exists(Pattern(GL03_green).similar(0.90)):set_GL03_grey(log_file);rs=7
示例7: set_GL03_grey
def set_GL03_grey(log_file):
click(GL03_green)
sleep(5)
PF_common.verify(log_file, "1397823232052.png")
click("1397823339801.png")
sleep(2)
click("1397823384109.png")
sleep(2)
click("1397824049012.png")
sleep(5)
mouseMove(Location(1000,100))
PF_common.verify(log_file, "1403700605466.png")
示例8: reset_result
def reset_result(log_file):
y=PF_check_required_init(log_file)
PF_common.write_log(log_file, "value of y is:" +str(y))
if y >1:
#PF_Chrome_setup(log_file)
PF_common.reset_account(log_file)
y=PF_check_required_init(log_file)
if y==1:PF_common.write_log_with_screenshot(log_file, "Required status are set to orange, ready to test!")
else:
PF_common.write_log_with_screenshot(log_file,"Chrome setup failed! Please check out and restart setup!"+str(y))
raise Exception("Chrome setup failed! Please check out and restart setup!"+str(y))
else:
PF_common.write_log_with_screenshot(log_file, "Required status are all already orange, ready to test!")
示例9: PF_WebApp_FB02_FaceMatchingOff_GreenToGrey_1378
def PF_WebApp_FB02_FaceMatchingOff_GreenToGrey_1378(log_file):
face_matching_off_green=("face_matching_off_green.png")
face_matching_off_hover=("face_matching_off_hover.png")
face_matching_off=("face_matching_off.png")
top_bar=("top_bar.png")
none_click=("none_click.png")
none_hihglited=("none_hihglited.png")
friends_click=("1400759914976.png")
fixes_icon=("fixes_icon.png")
face_matching_on_grey=("face_matching_on_grey.png")
mouseMove(Location(1000,120))
PF_common.verify(log_file,face_matching_off_green)
sleep(1)
hover(face_matching_off_green)
PF_common.verify(log_file,face_matching_off_hover)
click(face_matching_off)
PF_common.verify(log_file,top_bar)
sleep(1)
click(none_click)
sleep(3)
click(friends_click)
sleep(3)
click(fixes_icon)
PF_common.verify(log_file,face_matching_on_grey)
示例10: PF_WebApp_FB06_App_Access_On_GreenToGrey_1344
def PF_WebApp_FB06_App_Access_On_GreenToGrey_1344(log_file):
apps_access_grey=("apps_access_grey.png")
apps_access_green_mouseover=("apps_access_green_mouseover.png")
apps_access_green_fix=("apps_access_green_fix.png")
top_bar=("top_bar.png")
fixes_icon=("fixes_icon.png")
checkbox=("checkbox.png")
save=("save.png")
apps_access_green=("apps_access_green.png")
PF_common.verify(log_file, apps_access_green)
hover(apps_access_green)
PF_common.verify(log_file, apps_access_green_mouseover)
click(apps_access_green_fix)
PF_common.verify(log_file, top_bar)
i=0
while exists(checkbox) and i<3:
click(checkbox)
sleep(5)
i+=1
click(save)
sleep(2)
click(fixes_icon)
PF_common.verify(log_file, apps_access_grey)
示例11: PF_Web_FB06_AppAccessOn_OrangeToGreen_1342
def PF_Web_FB06_AppAccessOn_OrangeToGreen_1342(log_file):
apps_access_orange=("apps_access_orange.png")
apps_access_orange_mouseover=("apps_access_orange_mouseover.png")
apps_access_orange_fix=("apps_access_orange_fix.png")
top_bar=("top_bar.png")
fixes_icon=("fixes_icon.png")
apps_others_use=("apps_others_use.png")
apps_access_revieved=("apps_access_revieved.png")
PF_common.verify(log_file, apps_access_orange)
hover(apps_access_orange)
PF_common.verify(log_file, apps_access_orange_mouseover)
click(apps_access_orange_fix)
PF_common.verify(log_file, top_bar)
PF_common.verify(log_file, apps_others_use)
click(fixes_icon)
mouseMove(Location(1000,150))
PF_common.verify(log_file, apps_access_revieved)
示例12: PF_WebApp_FB02_FaceMatchingOn_OrangeToGrey_1376
def PF_WebApp_FB02_FaceMatchingOn_OrangeToGrey_1376(log_file):
FaceMatchingOn_orange=("FaceMatchingOn_orange.png")
FaceMatchingOn_hover=("FaceMatchingOn_hover.png")
top_bar=("top_bar.png")
FaceMatchingOn_settings=("FaceMatchingOn_settings.png")
fix_icon=("fix_icon.png")
FaceMatchingOn_grey=("FaceMatchingOn_grey.png")
mouseMove(Location(1000,120))
PF_common.verify(log_file,FaceMatchingOn_orange)
sleep(1)
hover(FaceMatchingOn_orange)
PF_common.verify(log_file,FaceMatchingOn_hover)
click(Pattern(FaceMatchingOn_hover).similar(0.50).targetOffset(0,-5))
PF_common.verify(log_file,top_bar)
PF_common.verify(log_file,FaceMatchingOn_settings)
click(fix_icon)
PF_common.verify(log_file,FaceMatchingOn_grey)
示例13: PF_WebApp_FB01_NotFindableOnGoogle_GreenToGrey_1333
def PF_WebApp_FB01_NotFindableOnGoogle_GreenToGrey_1333(log_file):
not_findable_on_google_selection=("not_findable_on_google_selection.png")
not_findable_on_google_checkbox=("not_findable_on_google_checkbox.png")
fix_icon=("fix_icon.png")
not_findable_on_google_grey=("not_findable_on_google_grey.png")
not_findable_on_google_grey_tooltip=("not_findable_on_google_grey_tooltip.png")
not_findable_on_google_green=("not_findable_on_google_green.png")
not_findable_on_google_tooltip=("not_findable_on_google_tooltip.png")
not_findable_on_google_tooltipclick=("not_findable_on_google_tooltipclick.png")
not_findable_on_google_topbar=("not_findable_on_google_topbar.png")
#verify the above images
#print str(fix_icon)
PF_common.verify(log_file,not_findable_on_google_green)
hover(not_findable_on_google_green)
PF_common.verify(log_file,not_findable_on_google_tooltip)
click(not_findable_on_google_tooltipclick)
PF_common.verify(log_file,not_findable_on_google_topbar)
PF_common.verify(log_file,not_findable_on_google_selection)
click(not_findable_on_google_checkbox)
sleep(3)
click(fix_icon)
PF_common.verify(log_file,not_findable_on_google_grey)
示例14: PF_WebApp_GL_InGoogleAds_OrrangeToAllow_517
def PF_WebApp_GL_InGoogleAds_OrrangeToAllow_517(log_file):
profile_visits_orange=("orange.png")
ornage_hover=("orange_hover.png")
orange_click=("orange_click.png")
top_bar=("top_bar.png")
fix_button=("Fixes.png")
allowed=("gray.png")
check_box=("check-box.png")
PF_common.verify(log_file,profile_visits_orange)
hover(profile_visits_orange)
PF_common.verify(log_file, ornage_hover)
sleep(1)
click(orange_click)
sleep(5)
PF_common.verify(log_file, top_bar)
PF_common.verify(log_file,check_box)
sleep(1)
click(fix_button)
sleep(5)
PF_common.verify(log_file, allowed)
示例15: set_GL01_grey
def set_GL01_grey(log_file):
click(GL01_green)
sleep(5)
PF_common.verify(log_file,"1397822686053.png")
click("1397822710861.png")
sleep(2)
click(fix_icon)
sleep(5)
mouseMove(Location(1000,100))
PF_common.verify(log_file, "1397822850994.png")
PF_common.write_log_with_screenshot(log_file, "GL01 is set to grey!")