Issues clicking an element using selenium
<p>Im using this code to explore tripadvisor (Portuguese comments)</p>

<pre><code>from selenium import webdriver
from bs4 import BeautifulSoup
driver=webdriver.Firefox()
driver.get("https://www.tripadvisor.com/Airline_Review-d8729164-Reviews-Cheap-Flights-TAP-Portugal#review_425811350")
driver.set_window_size(1920, 1080)
</code></pre>

<p>Then Im trying to click the google-translate link</p>

<pre><code>driver.find_element_by_class_name("googleTranslation").click()
</code></pre>

<p>But getting this error :-</p>

<pre><code>WebDriverException: Message: Element is not clickable at point (854.5, 10.100006103515625). Other element would receive the click: &lt;div class="inner easyClear"&gt;&lt;/div&gt;
</code></pre>

<p>So the <code>div class="inner easyClear"</code> is getting the click. I tried exploring it </p>

<pre><code>from bs4 import BeautifulSoup
page=driver.page_source 
for i in page.findAll("div","easyClear"):
    print i
    print "================="
</code></pre>

<p>But was unable to get any intuition from this as in what changes to incorporate now to make the "Google Translate" clickable. Please help</p>

<p>===============================EDIT===============================</p>

<p>Ive also tried these </p>

<pre><code>driver.execute_script("window.scrollTo(0, 1200);")
driver.find_element_by_class_name("googleTranslation").click()
</code></pre>

<p>Resizing the browser to full screen etc..</p>

<p>What worked for me was to use an Explicit Wait and the <code>element_to_be_clickable</code> Expected Condition and get to the inner <code>span</code> element:</p>

<pre><code>from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome()
driver.get("https://www.tripadvisor.com.br/ShowUserReviews-g1-d8729164-r425802060-TAP_Portugal-World.html")

wait = WebDriverWait(driver, 10)

google_translate = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".googleTranslation .link")))

actions = ActionChains(driver)
actions.move_to_element(google_translate).click().perform()
</code></pre>

<p>You may also be getting into a "survey" or "promotion" popup - make sure to account for those.</p>

python selenium selenium-webdriver web-scraping