Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to find post button #6

Open
Rashmikid opened this issue Apr 21, 2019 · 2 comments
Open

unable to find post button #6

Rashmikid opened this issue Apr 21, 2019 · 2 comments

Comments

@Rashmikid
Copy link

"post_button = driver.find_element_by_xpath("//*[@data-testid='react-composer-post-button']")
clickable = False
while not clickable:
cursor = post_button.find_element_by_tag_name('span').value_of_css_property("cursor")
if cursor == "pointer":
clickable = True
break
post_button.click()
time.sleep(5)"

Exception -


ElementNotVisibleException Traceback (most recent call last)
in
16 clickable = True
17 break
---> 18 post_button.click()
19 time.sleep(5)

@Rashmikid
Copy link
Author

I tried using below code but no luck, any help is highly appreciated.

sleep(5)
buttons = driver.find_elements_by_tag_name("button")
sleep(5)
for button in buttons:
if button.text == "Post":
button.click()

@iharshit009
Copy link

I think the above code must work because I am getting a successful result through the same code
Can you please tell me what is the error you are facing?? so that i can help..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants