In the PeopleSoft page if I click on the lookup it pops up a new widget, I need to select one of the options.
The DOM has been designed in a way which has "style="overflow: hidden;"" in the body tag, with the below xpath I am able to identify the frame in google chrome, however, I couldn't switch to the frame and click on the option I need to select
HTML of the iframe:
<iframe frameborder="0" id="ptModFrame_2" name="ptModFrame_2" src="https://*******:8560/psc/umcssi2/EMPLOYEE/SA/c/SSR_PROG_ENRL.SSR_APT_REQ_RUNCNT.GBL?ICType=Panel&ICElementNum=0&ICStateNum=7&ICResubmit=1&ICAJAX=1&" style="width: 514px; height: 350px;"></iframe>
I tried with the below xpath to switch to the frame:
Xpath to switch to frame: //div[@id='pt_modals']/div[2]/div/div[2]/iframe[contains(@src,'https://*******')]
Xpath to select the option after switching:
driver.findElement(By.xpath("//table/tbody/tr[4]/td[1]")).click();
Note: I also tried javascript executor.
js.executeScript("arguments[0].click();",driver.findElement(By.xpath("//table/tbody/tr[4]/td[1]")));
I have just frame the same DOM,
<body class="PSPAGE" id="ptifrmtemplate" style="overflow: hidden;"><div id="ptpopupmask" style="display: none;"> </div>
I expect that it should click but it is not switching to the frame in first place.