我正在尝试在我们的网站中找到一个基于每个用户动态创建的flash元素,我正在努力让Selenium识别该元素。
以下是该网站的HTML。
<div style="height:380px;" id="CustomerMenu">
<object height="100%" width="100%" type="application/x-shockwave-flash" data="https://genericdemoplus42.dataimpact.com/swf/ApplicationMenu.swf" id="menuSwfDiv" style="visibility: visible;">
<param name="wmode" value="opaque">
<param name="allowscriptaccess" value="always">
<param name="flashvars" value="txtUsrInfo=ebe5B48ogm9c44NmC0oE4wMytr1I2R1R8u0lQaXihXqBrOlRP6LPt5tpLssc%2FIcuDal3QYNG3L0uP6t0b1VO0XdcByfG3tk%2FTWuTHFML5ljYkiA0%2FSlGr7f1M1vn7v1mWKIY1H0jayn21uojVZr1NQ%3D%3D&txtCustomLocalDir=7QPTAq5jW6oZtSKXJvog%2bg%3d%3d&txtServerDir=j7wD07B866hSgtgma%2fJLHMJue5CbIxhM6MzVY8KSCs0%3d&txtWebServerUrl=https://website.com/&txtWebCustomUrl=https://site.com/&txtCustomerId=ACv4Qsx9%2freYK6%2bRI8n0%2fw%3d%3d&txtAssetUrl=https://assets.site.com/Assets/site42/"></object></div>
答案 0 :(得分:0)
看起来像Flash元素可以在下面找到:
driver.findElement(By.xpath("//object[@type='application/x-shockwave-flash']"))