Contributions
How to call a function nested inside another function in another script to our script
HI all , I have a function nested inside another function in the first script as: function Add_Department() { function example() { // some set of statements } } I have another script second script as: function Edit_Department() { } I need to call the example function from the first script inside the second script . How can we do this in Testcomplete 10 . Please help. Thanks, prem2KViews0likes1CommentRe: Cannot able to do cross browser testing
Thanks for your reply.Yes. After the patch installed it is working properly for the login functionality using the code: var browser = Browsers.Item(btFirefox); browser.Run(); Aliases.firefox.wndMozillaWindowClass.Keys("example.abc.com[Enter]"); Sys.Browser("firefox").Page("http://example.abc.com/").Panel("container").Form("frmLogin").Panel("rt_content").Panel("login").Table(0).Cell(5, 1).ImageButton("imgbtnLogin").Click(); But when passing the Url it is not possible to achieve common code: IE Browsers.Item(btIExplorer).Navigate("http://example.abc.com/"); Chrome Aliases.chrome.wndChrome_WidgetWin_1.Keys("http://example.abc.com/"); Firefox Aliases.firefox.wndMozillaWindowClass.Keys("http://example.abc.com/"); We need to achieve a common code for passing URL.Kindly help. Regards, prem1.5KViews0likes0CommentsCannot able to do cross browser testing
we recorded a page in our application in IE and we get the script as : Call Aliases.browser.ToUrl("http://example.abc.com/") Call Aliases.browser.pageTips.formFrmlogin.table.textboxTxtemailaddr.Keys("aaa@abc.com") 'Enters '[Tab]' in the 'textboxTxtemailaddr' object. Call Aliases.browser.pageTips.formFrmlogin.table.textboxTxtemailaddr.Keys("[Tab]") 'Sets the text 'test1234' in the 'passwordboxTxtpassword' text editor. Call Aliases.browser.pageTips.formFrmlogin.table.passwordboxTxtpassword.Keys("abc") 'Clicks at point (27, 9) of the 'imagebuttonImgbtnlogin' object. Call Aliases.browser.pageTips.formFrmlogin.table.imagebuttonImgbtnlogin.Click(27, 9) But this code when we run in other browsers like firefox and chrome it is not working. The same page we recorded in chrome and firefox and got the code as firefox: Call Aliases.firefox.wndMozillaWindowClass.Click(165, 106) Call Aliases.firefox.wndMozillaWindowClass.Keys("http://example.abc.com[Enter]") Call Aliases.firefox.wndMozillaWindowClass.Keys("aaa@abc.com[Tab]") Call Aliases.firefox.wndMozillaWindowClass.Keys("abc") Call Aliases.firefox.wndMozillaWindowClass.Click(649, 489) chrome: Call Aliases.browser.BrowserWindow.Keys("http://example.abc.com[Enter]") Call Aliases.browser.BrowserWindow.Click(648, 325) 'Enters 'test@preludesys.com[Tab]' in the 'BrowserWindow' object. Call Aliases.browser.BrowserWindow.Keys("aaa@abc.com[Tab]") 'Clicks at point (641, 354) of the 'BrowserWindow' object. Call Aliases.browser.BrowserWindow.Click(641, 354) 'Enters 'test1234' in the 'BrowserWindow' object. Call Aliases.browser.BrowserWindow.Keys("abc") 'Clicks at point (636, 440) of the 'BrowserWindow' object. Call Aliases.browser.BrowserWindow.Click(636, 440) we have to do cross browser testing for this functionality using a single script for all browsers.Please help . Regards premSolved3.7KViews0likes4Comments