how to handle split buttons in Selenium WebDriver


Split button dropdowns use the same general style as the dropdown button but add a primary action along with the dropdown.
Example:

Below is the code snippet.
String objs="//table[@id='PlanningModule_planWorkflow_workflowLockButton']//tr[2]/td[@class='x-btn-mc']/em[@class='x-btn-split']/button";
WebElement ele =driver.findElement(By.xpath(objs));
ele.click();
 ele.sendKeys(Keys.ARROW_DOWN);              
 driver.findElement(By.xpath("//div[@class=' x-menu-list']//a[@id='PlanningModule_planWorkflow_Lock _lock ' and contains(text(),'Full Lock')]")).click();

Comments