- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwordpress.py
More file actions
Latest commit
19 lines (13 loc) · 649 Bytes
/
Copy pathwordpress.py
File metadata and controls
19 lines (13 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fromseleniumimportwebdriver
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"