for in full_docif id ="signup_email" setattribute("value",usernameelif id ="signup_password" setattribute("value",passwordrandom_sleep(you can be presented with different home pages if ie document forms[ id ="signup_form"ie document forms[ submit(elseie document forms[ submit(except indexerrorepass random_sleep(the login form is the second form on the page wait_for_browser(iereturn we create simple function called random_sleep that will sleep for random period of timethis is designed to allow the browser to execute tasks that might not register events with the dom to signal that they are complete it also makes the browser appear to be bit more human our login_to_tumblr function begins by retrieving all elements in the dom and looks for the email and password fields and sets them to the credentials we provide (don' forget to sign up an accounttumblr can present slightly different login screen with each visitso the next bit of code simply tries to find the login form and submit it accordingly after this code executeswe should now be logged into the tumblr dashboard and ready to post some information let' add that code now def post_to_tumblr(ie,title,post)full_doc ie document all for in full_docif id ="post_one" setattribute("value",titletitle_box focus(elif id ="post_two" setattribute("innerhtml",postprint "set text areai focus(elif id ="create_post"print "found post buttonpost_form focus(move focus away from the main content box random_sleep(title_box focus(random_sleep(post the form post_form children[ click(wait_for_browser(ierandom_sleep(return none of this code should look very new at this point we are simply hunting through the dom to find