Last active
September 22, 2023 21:51
-
-
Save rahim42324/d11dbe1790b59960cbb2b6b20fa243e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| from selenium.webdriver import ActionChains | |
| import time | |
| driver=webdriver.Chrome("chromedriver.exe") | |
| driver.get("https://twitter.com/login") | |
| time.sleep(3) | |
| driver.find_element_by_xpath("//input[@name='session[username_or_email]']").sendkeys("type username") | |
| driver.find_element_by_xpath("//input[@name='session[password]']").sendkeys("type password") | |
| driver.find_element_by_xpath("//div[@data-testid='LoginForm_Login_Button']").click() | |
| time.sleep(3) | |
| driver.find_element_by_class_name('DraftEditor-root').click() | |
| element=driver.find_element_by_class_name('public-DraftEditorPlaceholder-root') | |
| ActionChains(driver).move_to_element(element).send_keys("hello world").perform() | |
| driver.find_element_by_xpath("//*[context='text(Tweet)']").click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment