Created
May 26, 2016 18:46
-
-
Save nithyadurai87/c6380e75b3260a4ee5460e0fa6c8f1d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
a = webdriver.Firefox() | |
a.get("https://valaipathivu.wordpress.com/wp-admin") | |
a.maximize_window() | |
a.find_element_by_xpath("//input[@id='user_login']").send_keys("valaipathivu") | |
a.find_element_by_xpath("//input[@id='user_pass']").send_keys("Kadavuchol") | |
a.find_element_by_xpath("//input[@id='wp-submit']").click() | |
print "Login is successful" | |
a.find_element_by_link_text("Posts").click() | |
a.find_element_by_link_text("Add New").click() | |
a.find_element_by_xpath("//input[@id='title']").send_keys("Tamil Kavithaikal") | |
a.find_element_by_xpath("//input[@id='publish']").click() | |
print "New post is Published" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment