Question
enigma metaverse
IN
Last activity: 28 Nov 2023 7:50 EST
issue with selenium while accesing buttons inside of a frame
in our pega project, to achieve end to end test automation, we have decided to use pega selenium starter kit to achieve test automation. everything is working fine.
but facing issues while accessing buttons inside of a frame in our Pega application. we can access the text boxes and enter data in those text fields also, but while accessing buttons in the page, selenium is not detecting the same
we included in code to enter frames also like this pegadriver.switchto().frame(frameid).
control is going to respective frame but cant access the buttons only while one text box is getting located by selenium inside of the same frame, the locators used are correct, we verified in dom. we checked with different locators and still cant access the buttons inside the frame. the issue is there with the buttons in other frames also while other webelements like text box, links are working good.
kindly let us know the solution, thanks in advance. please refer code snippet for the issue below..
for webelement button (not working) in same iframe
pegaDriver.switchTo().frame("PegaGadget1Ifr");
PegaWebElement conclude_button = pegaDriver.findElement(By.xpath("//button[@class='Wrap_up_button pzhc pzbutton']"));
conclude_button .click();
for webelement text box(working fine) in same iframe
pegaDriver.switchTo().frame("PegaGadget1Ifr");
PegaWebElement search_field = pegaDriver.findElement(By.xpath("//input[@id='a3b3c2bf']"));
in our pega project, to achieve end to end test automation, we have decided to use pega selenium starter kit to achieve test automation. everything is working fine.
but facing issues while accessing buttons inside of a frame in our Pega application. we can access the text boxes and enter data in those text fields also, but while accessing buttons in the page, selenium is not detecting the same
we included in code to enter frames also like this pegadriver.switchto().frame(frameid).
control is going to respective frame but cant access the buttons only while one text box is getting located by selenium inside of the same frame, the locators used are correct, we verified in dom. we checked with different locators and still cant access the buttons inside the frame. the issue is there with the buttons in other frames also while other webelements like text box, links are working good.
kindly let us know the solution, thanks in advance. please refer code snippet for the issue below..
for webelement button (not working) in same iframe
pegaDriver.switchTo().frame("PegaGadget1Ifr");
PegaWebElement conclude_button = pegaDriver.findElement(By.xpath("//button[@class='Wrap_up_button pzhc pzbutton']"));
conclude_button .click();
for webelement text box(working fine) in same iframe
pegaDriver.switchTo().frame("PegaGadget1Ifr");
PegaWebElement search_field = pegaDriver.findElement(By.xpath("//input[@id='a3b3c2bf']"));
search_field.click();
pegaDriver.switchTo().frame("PegaGadget1Ifr");
search_field.sendKeys(" customer name");