I am trying to click the Record button through Selenium in Google Chrome. However I am not able to. Element is not found. I have tried using id and xpath. None of them worked.
WebElement record = driver.findElement(By.id("record-button"));
record.click();
The HTML code is
<template id="profiling-view-template">
<tr-ui-b-info-bar-group></tr-ui-b-info-bar-group>
<x-timeline-view-buttons>
<button id="record-button">Record</button>
<button id="save-button">Save</button>
<button id="load-button">Load</button>
</x-timeline-view-buttons>
<tr-ui-timeline-view>
<track-view-container id="track_view_container"></track-view-container>
</tr-ui-timeline-view>
</template>
Any lead will be appreciated.