我想找到一個網頁登錄,但我不能做同樣的元素不可見 - 獲取Nosuchelement例外。selenium - 無法找到登錄
我嘗試使用下面的代碼,但每次我得到異常。 WebDriverWait等待=新的WebDriverWait(驅動程序,30); wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(「html/body/form/table/tbody/tr [3]/td [2]/input」))); (「html/body/form/table/tbody/tr [3]/td [2]/input」))。sendKeys(「admin」);
任何人都可以請在這幫助我。
由於HTML代碼的頁面是: -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Retail-J</title>
</head>
<frameset name ="mainFrameset" id ="mainFrameset" rows="55,*" frameborder="1" framespacing="2" border="2" bordercolor="#000000">
<frame name="titleFrame" src="title.jsp" marginheight="0" marginwidth="0" noresize="noresize" scrolling="no">
<frameset name="innerFrameset" id="innerFrameset" cols="20.0%,*" frameborder="0" border="0" framespacing="0" >
<frame name="contentFrame" src="dynamicContents.jsp" marginheight="0" marginwidth="0" noresize="noresize" target="mainFrame" scrolling="auto">
<frame name="mainFrame" src="Welcome.jsp" marginheight="0" marginwidth="0" scrolling="auto">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0">
Sorry your browser does not support framesets.
</body>
</noframes>
</frameset>
</html>
請在下面找到該代碼段: - –