簡體   English   中英

JAWS無法在Internet Explorer 11中讀取aria-label,因為div role =“ button”

[英]aria-label is not reading by JAWS in Internet explorer 11 for div role=“button”

我有一個父div,它具有tabindex =“ 0”和aria-label並有子div。 其中一個子div具有tabindex =“ 0”和aria-label。 JAWS 18在其他瀏覽器中正確讀取了此子div aria標簽,但在IE11中,它正在讀取父div的aria標簽。請幫助我解決此錯誤。

如果您可以說哪個div具有角色=“ button”,那就太好了。 到目前為止,這就是我使用JAWS 18和IE 11所獲得的全部

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>NA</title>
    </head>
    <body>
        <div id="parent" tabindex="0" aria-label="I am your father">
            0
            <div id="child" tabindex="0" aria-label="so, why mum says it's the butcher?">
                1                
            </div>
            <div id="child" tabindex="-1" aria-label="wrong guy, dude">
                2
            </div>
        </div>
    </body>
</html>

如何定位元素<div aria-label></div><div id="text_translate"><p>我在 selenium java 中非常初級。 我正在嘗試在亞馬遜中找到該元素。</p><p> 當我嘗試運行此代碼時,我找不到該元素。 請幫助解決這個問題。</p><p> <a href="https://i.stack.imgur.com/eMWTB.png" rel="nofollow noreferrer">在此處輸入圖像描述</a></p><p>這是我的代碼</p><pre> WebElement a_review= driver.findElement(By.xpath("//div[@aria-label='4 Stars &amp; Up']")); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView();", a_review); a_review.click();</pre></div>

[英]how to locate the element in <div aria-label>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM