示例#1
0
fb = resp['fb']
tw = resp['tw']
ko = resp['ko']
ins = resp['ins']
rd = resp['rd']
yt = resp['yt']

cf.browser_activate(dummy_browser=False)
cf.browser.Config.implicit_wait_secs = 30

try:
    if ln:
        cf.browser_navigate_h(ln)
        cf.pause_program(2)
        cf.browser_refresh_page_h()
    cf.browser_wait_until_h(text="ClointFusion India")
    cf.pause_program(2)
    cf.browser_mouse_click_h("Like")
    cf.pause_program(3)
    cf.text_to_speech(
        f'hey {cf.user_name}, thanks, for liking our LinkedIn POST!')
except Exception as ex:
    print("Error in LinkedIn Liker" + str(ex))

try:
    if fb:
        cf.browser_navigate_h(fb)
        cf.pause_program(2)
        cf.browser_refresh_page_h()
    cf.browser_wait_until_h(text="ClointFusion India")
    cf.pause_program(2)
示例#2
0
import ClointFusion as cf
cf.browser_navigate_h("https://www.gmail.com")
#user_name = cf.browser_locate_element_h("//*[@id='identifierId']")

#put your email id here
email = "*****@*****.**"
cf.browser_write_h(email,"Email or Phone") 
cf.browser_mouse_click_h("Next")

#password in txt file for encryption
#create txt file.
#add your password in it
f = open("password.txt", "r")
password = f.read()
cf.browser_write_h(password,"Enter your password")
cf.browser_mouse_click_h("Next")

cf.browser_wait_until_h("loading gmail")

#process for email writing starts here
cf.browser_mouse_click_h("Compose")
cf.browser_write_h("*****@*****.**","To")
cf.browser_write_h("test" ,"Subject")
cf.key_press('tab')
message = "hi this is test" 
cf.key_write_enter(message)
cf.browser_mouse_click_h("Send")
cf.browser_wait_until_h("Message sent.")

cf.browser_quit_h()