I want to click on "Open device Access" button but when i click on accordion, the button "Open device access" is not displayed. I think that JavaScript is not active because the transfer between "display none" and "display block" doesn't exist. The button "Open device acces" is not visible after a click on accordion.
HTML code :
<div id="device_hmi_content_22">
<div id="accordion_device_hmi_22" class="accordion">
<h2 class="accHeadline accHeadlineClosed">Device Access</h2>
<div class="accContent accContentClosed" style="display: none;">
<div class="submit">
<input type="button" onclick="onOpenSessionClick()" value="Open device access">
</div>
</div>
JavaScript code :
driver.findElement(By.xpath("//a[@href='/mybox/devices/satellite.php']")).click();
Thread.sleep(5000);
driver.findElement(By.id("device_hmi_content_22")).click();
WebElement element2 = driver.findElement(By.xpath("//input[@value='Open device access']"));
if (isElementPresent(By.xpath("//input[@value='Open device access']")))
{
driver.findElement(By.xpath("//input[@value='Open device access']")).click();