Skip to content Skip to sidebar Skip to footer

Python .click() Not Working

I am currently using the following Python and Selenium versions: Python34 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06)[MSC v.1600 32 bit (Intel)] Selenium VERSION 2.53.2 I am

Solution 1:

Does this help?

import os
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

#Global Variables
target = "..."
username = "..."
password = "..."deflogmein():
    search_box = driver.find_element_by_name('email')
    search_box.send_keys(username)
    search_box = driver.find_element_by_name('pass')
    search_box.send_keys(password)
    search_box.submit()

driver = webdriver.Firefox()

driver.get("https://www.facebook.com//")

logmein()

SeeMore = WebDriverWait(driver, 15).until(EC.element_to_be_clickable((By.LINK_TEXT, 'See More...')))
print("Found See More")
time.sleep(2) # apparently there is some javascript execution that requires this sleep to be here.
SeeMore.click()
print("Expand SeeMore option")

Would be great to see a screenshot of the mentioned link. This way I could go to an analog Facebook page and make sure it works.

Solution 2:

"Display settings" -> "Scale and layout":

Size should be 100% - and that must match the ZOOM of your browser - also 100%

I have had this problem on IE for about 12 hours, tried all possible variations of clicking, hovering over element - then clicking, using find_element_by_link_text, updating everything .etc. and also tried some of the things that people suggested in stackoverflow - nothing worked.

Zooming to 100% in browser and setting display scale to 100% did the trick.

Post a Comment for "Python .click() Not Working"