Mr_Bro
5 years agoFrequent Contributor
JavaScript Custom function for finding objects within the iframe
Hi Team,
i am trying to find element objects within an ifram object, but im not able to do a object spy on those, so i had tried launching the browser by disabling the web securites and notice...
- 4 years ago
i found the solution by launching the chrome using Command-line arguments
and find the iframe object as a parent and after that try finding all the required child objects using parent.findchild() or parent.FindElement() methods.
below is the sample code to launch the chrome using Command-line arguments:
def launchBrowser(): if Sys.WaitBrowser("chrome").Exists: #code to close the browser closeBrowser() strChromeProfilePath = aqEnvironment.GetEnvironmentVariable("USERPROFILE") + '\\Documents\\TempChromeProfile\\' Browsers.Item["chrome"].RunOptions = '--disable-web-security --user-data-dir='+strChromeProfilePath+' --disable-site-isolation-trials' Browsers.Item["chrome"].Run Browsers.Item["chrome"].Navigate('https://www.abcdefg.com'); Sys.Browser("chrome").BrowserWindow(0).Maximize() page = Sys.Browser("chrome").Page('https://www.abcdefg.com') page.Wait()
Thanks and Regards,
Sathish Kumar K