def login_wp(username="", password=""):

    #Just replace the below  link with your word press user login link

    cf.launch_website_h("https://tech2everyone.live")

    # give the user name below while calling the function dont edit the below two lines

    cf.browser_write_h(username, "Username")
    cf.browser_write_h(password, "Password")
    cf.browser_mouse_click_h("Log In")
    cf.browser_mouse_click_h("Posts")

    lastpage = cf.browser_locate_element_h(
        '//*[@id="posts-filter"]/div[1]/div[3]/span[2]/a[2]')
    cf.browser_mouse_click_h(lastpage)

    select_files = cf.browser_locate_element_h('//*[@id="cb-select-all-1"]')
    cf.browser_mouse_click_h(select_files)

    bulkaction = cf.browser_locate_element_h(
        '//*[@id="bulk-action-selector-top"]')
    cf.browser_mouse_click_h(bulkaction)

    cf.key_press("down+down")
    cf.key_press("down+down")
    cf.key_hit_enter()

    Apply = cf.browser_locate_element_h('//*[@id="doaction"]')
    cf.browser_mouse_click_h(Apply)

    cf.browser_quit_h()
import ClointFusion as cf
cf.launch_any_exe_bat_application('notepad')
cf.key_hit_enter()
cf.key_write_enter('RR',key='')
cf.key_press('alt+f4')
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(img=str(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_d25dzkx7_generator\Images\Snips\2-Notepad-940_242.png'),conf=0.7))
cf.mouse_click(*cf.mouse_search_snip_return_coordinates_x_y(img=str(r'C:\Users\mrmay\AppData\Local\Temp\cf_log_d25dzkx7_generator\Images\Snips\3-Notepad-985_361.png'),conf=0.7))
Esempio n. 3
0
def launch_game():
    cf.launch_any_exe_bat_application("chrome")
    cf.key_write_enter("chrome://dino")
    cf.key_hit_enter()
    cf.key_press("space")
    return