I'm trying to sign in my account in Figure eight
using selenium and python but i can't because there is no any HTML elements in the page only these lines exist.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="ie=edge" http-equiv="x-ua-compatible">
<title>Figure Eight Contributor Portal</title>
<link href="/favicon.ico" rel="shortcut icon" />
<link href="//fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet" />
<link href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" rel="stylesheet" />
</head>
<body>
<div id="app">
</div>
<script src="/1.index.js?eca43d17e540e40a3231" type="text/javascript"></script>
<script src="/index.js?eca43d17e540e40a3231" type="text/javascript"></script>
</body>
</html>
Surprisingly when i use inspect element i can get the HTML elements. Searching for similar topic on stackoverflow and google but can't find any solution. My code trying to sign in is :
from selenium import webdriver
from selenium.webdriver.support.expected_conditions import presence_of_element_located
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver import Chrome
def sign_in(driver, url):
driver.get(url)
WebDriverWait(driver, 60).until(presence_of_element_located(driver.find_element_by_id('Email')))
username = driver.find_element_by_id("Email")
password = driver.find_element_by_id("Password")
username.send_keys("##########")
password.send_keys("@@@@@@@@@@")
driver.find_element_by_name("Sign in").click()
return True, "Success"
url = "https://contributors.figure-eight.work/login"
driver = Chrome()
result, message = sign_in(driver, url)
if result:
print(message)