Please help , i have to access a javascript pop up window that redirects to a url and having form fields within it.
It does not contain min/max button. and nothing works until this window is not closed or filled and updated.
2: i tried to close that window ......................................nothing works yet...
@Test(priority=9)
public void PurchaseUpload_activevendor() throws Exception
{
System.out.println("CheckPurchasesubmenupages started");
UIMap(datafilefilepath);
driver.get(getData("url"));
verifyHomepageTitle("Dnet");
lp.Login(getData("username"),getData("password"));
//Assert.assertTrue(false);
System.out.println(driver.getWindowHandle());
hp.frame_top();
myWait.until(ExpectedConditions.elementToBeClickable(hp.clickPurchaseaggrmnt));
pa.Handlesubcategorylinks();
System.out.println("about to click");
//pa.tabularname().click();
JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", pa.tabularname());
Thread.sleep(6);
String script = "window.onbeforeunload = null;" + "window.close();";
js.executeScript(script);
}