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()
Example #2
0
except Exception as ex:
    print("Error in RedIT Liker" + str(ex))

try:
    if rd:
        cf.browser_navigate_h(rd)
        cf.pause_program(2)
        cf.browser_refresh_page_h()
    cf.browser_wait_until_h(text="ClointFusion")
    cf.pause_program(2)
    cf.browser_mouse_click_h("upvote")
    cf.pause_program(3)
    cf.text_to_speech(f'{cf.user_name} Thanks, for upvoting, our REDIT POST')
except Exception as ex:
    print("Error in RedIT Liker" + str(ex))

try:
    if yt:
        cf.browser_navigate_h(yt)
        cf.pause_program(2)
        cf.browser_refresh_page_h()
    cf.browser_wait_until_h(text="ClointFusion")
    cf.pause_program(2)
    cf.browser_mouse_click_h("I like this")
    cf.pause_program(3)
    cf.text_to_speech(
        f'{cf.user_name} Thanks, for giving a like for, our Youtube video.')
except Exception as ex:
    print("Error in RedIT Liker" + str(ex))
cf.browser_quit_h()