Я не могу войти в платформу WebEx, и мне нужно иметь возможность войти в WebEx, чтобы очистить совещания, запланированные на неделю. Я продолжаю получать трассировки, но я не могу даже send.keys()
методы для формы перспективного входа в контейнере входа. Главное, что у меня проблема только с аутентификацией. Мне нужно иметь возможность войти в систему, чтобы иметь возможность анализировать и видеть текущее расписание недель.
Вы можете увидеть код здесь: https://github.com/Richard-Barrett/ITAdminInfra/blob/master/Integrations/WebEx/list_meetings.py
Код, который не работает:
#browser.switchTo.frame("topframeset")
#browser.switch_to.frame("main")
# Authentication
# Credentials NEEDS UNIT TEST
username = WebDriverWait(browser, delay).until(EC.presence_of_element_located((By.ID, 'mwx-ipt-username')))
#utente = browser.find_element_by_id("mwx-ipt-username").send_keys('user@gestione.eu')
password = WebDriverWait(browser, delay).until(EC.presence_of_element_located((By.ID, 'mwx-ipt-password')))
username.send_keys(config['user']['username'])
password.send_keys(config['user']['password'])
# Authentication submit.click()
# For XPATH = //*[@id='mwx-btn-logon']
element = WebDriverWait(browser, 20).until(
EC.element_to_be_clickable((By.XPATH, "//*[@id='mwx-btn-logon']")))
element.click();
print("Logging into Mirantis WebEx System!")
Вот источник страницы :
<!DOCTYPE html>
<html lang="en-US">
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name='robots' content='noindex,nofollow'>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name='format-detection' content='telephone=no'>
<meta name='slack-app-id' content='A5P5FDK33'>
<meta name="description" content="15"><link rel="shortcut icon" href="/favicont29.ico" type="image/x-icon">
<TITLE>MIRANTIS INC WebEx Enterprise Site</TITLE>
<meta http-equiv="Pragma" content="no-cache">
<meta property="og:type" content="website" />
<meta property="og:title" content="Cisco Webex Meetings" />
<meta property="og:description" content="Simple, modern video meetings for the global workforce. Join from anywhere, including your desktop, browser, mobile device, or video room device." />
<meta property="og:image" content="https://mirantis.webex.com/mw3300/mywebex/html/img/webexball_opengraph.png" />
<meta property="og:site_name" content="Cisco Webex Site" />
<meta property="og:url" content="https://mirantis.webex.com/" />
<script language="JavaScript">
function setCookie(name,value)
{
var Days = 30;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString()+";path=/";
}
function getCookie(Name)
{
var search = Name + "=";
if (document.cookie.length > 0)
{ // if there are any cookies
offset = document.cookie.indexOf(search);
if (offset != -1)
{ // if cookie exists
offset += search.length; // set index of beginning of value
end = document.cookie.indexOf(";", offset); // set index of end of cookie value
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(offset, end));
}
}
}
//default page should never load inside of another frame
if (top.location != self.location) {
top.location = self.location;
}
var oneDay= 1*24*60*60*1000;
var expDate = new Date();
expDate.setTime (expDate.getTime() + oneDay);
var cookieExpires = expDate.toGMTString();
document.cookie="verifyCookie=test; expires="+cookieExpires
if (document.cookie.length<=0 || getCookie("verifyCookie") == null){
window.open('https://mirantis.webex.com/mw3300/mywebex/jsp/common/warningnote.jsp?siteurl=mirantis', 'Warning', 'toolbar=no,menubar=no,status=no,scrollbars=auto,resizable=yes,width=300,height=220');
}
document.cookie="verifyCookie=CLEAR; expires=Sun, 09-Nov-97 01:00:00 GMT";
try{
if('/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("meetinginfo")!=-1||( '/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("e.do")!=-1&&'/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("siteurl")!=-1)&&'/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("landingpage.do")==-1&&'/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("mainframe.do")==-1&&'/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("mywebex")==-1&&'/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299'.indexOf("frame.do")==-1){
setCookie("jmtlogloginclicktime",new Date().getTime());
}
}catch(ex){
}
var dom = document.getElementById ? 1 : 0;
var ns4 = (document.layers && !dom ) ? 1 : 0;
// do for ns4 resize problem
function mm_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) {
with (navigator) {
if ((appName=="Netscape") && (parseInt(appVersion)==4)) {
document.mm_pgW=innerWidth;
document.mm_pgH=innerHeight;
onresize=mm_reloadPage;
}
}
} else if (innerWidth!=document.mm_pgW || innerHeight!=document.mm_pgH) {
location.reload();
}
}
if(ns4)
mm_reloadPage(true);
document.cookie = "screenWidth=" + screen.width + "; path=/; secure";
function closeWindow() {
window.close(opener=0);
}
function submitChildFrame(){
window.frames["mainFrame"].postChildForm("\x2fmw3300\x2fmywebex\x2flogin\x2flogin.do\x3fsiteurl\x3dmirantis\x26viewFrom\x3dmodern\x26login_return_url\x3dhttps\x253A\x252F\x252Fmirantis.webex.com\x252Fwebappng\x252Fsites\x252Fmirantis\x252Fdashboard\x253Fsiteurl\x253Dmirantis\x26rnd\x3d0.4396788955860299");
}
function submitChildFrame4Header(){
window.frames["header"].postChildForm4Logout();
}
</script>
<base href="https://mirantis.webex.com/mw3300/mywebex/jsp/frame/mywebex.jsp">
</HEAD>
<!-- CDN Host: akamaicdn.webex.com Status: OK -->
<FRAMESET id="topframeset" BORDER=0 FRAMEBORDER=0 FRAMESPACING=0 ROWS="131,*,0">
<FRAME SCROLLING="auto" NORESIZE NAME="header" SRC="/mw3300/mywebex/header.do?service=1&siteurl=mirantis&viewFrom=modern&rnd=0.738597730304002" title="The header frame of Cisco WebEx Meetings">
<FRAME SCROLLING="auto" NORESIZE NAME="mainFrame" SRC="/mw3300/mywebex/login/login.do?siteurl=mirantis&viewFrom=modern&login_return_url=https%3A%2F%2Fmirantis.webex.com%2Fwebappng%2Fsites%2Fmirantis%2Fdashboard%3Fsiteurl%3Dmirantis&rnd=0.4396788955860299" target="_top" title="The content frame of Cisco WebEx Meetings">
<FRAME SCROLLING="no" NORESIZE NAME="rotation" SRC="/mw3300/mywebex/frame/clientpath.do?siteurl=mirantis" title="The clientPath frame of Cisco WebEx Meetings">
</FRAMESET>
<noframes>
<h2>Sorry.</h2>
<p><b>Webex requires the use of Netscape Navigator 4.0, Internet Explorer 4.0 or better.</b></p>
</noframes>
</html>
Я что-то не так делаю? Я попытался перейти на сам фрейм, я никогда не сталкивался с ситуацией, когда я не смог войти.