hi dhanu,
driver.switchTo.frame(frameid or index); and then try. If not check both page and popup dialogue are in same contexts or not. If they are in different contexts say page in “NATIVE” and dialogue in “WEBVIEW” then switch the contexts accordingly
like
driver.context(“NATIVE”);