I'm trying to automate a log in on a website. I have the following code:
def __init__(self):
self.driver = webdriver.Chrome(executable_path = '/usr/bin/chromedriver')
def parse(self, response):
self.driver.get(response.url)
self.driver.switch_to.frame(self.driver.find_element_by_id('J_loginIframe'))
self.driver.find_element_by_name('fm-login-id').send_keys('iamgooglepenn')
self.driver.find_element_by_id('fm-login-password').send_keys('mypassword')
self.driver.find_element_by_class_name('fm-button fm-submit password-login').click()
Right now, this code successfully put in the log in information and click the login button; However, the web asks my spider to slide a bar to the right before logging me in. The HTML of the slidebar is as follows:
<span id="nc_1_n1z" class="nc_iconfont btn_slide" data-spm-anchor-id="0.0.0.i3.6a38teDwteDwKs" style="left:-2px";> ▫ </span>
Is there a way to automate this with python?