When trying to click on the "Open device Access" button within the accordion, it does not appear. It seems like there may be an issue with the JavaScript as the transition from "display none" to "display block" is not functioning properly. The "Open device access" button remains hidden even after clicking on the 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();