Forum Discussion
lucieneven
13 years agoContributor
Hello Robert,
I read through your answer for a couple of times. You explain very clearly. That greatly makes sense here.
When it comes to variable, it just reminded me of one interesting thing when i tried QTP as recording script. It's always wierd for me, cause looks like QTP hided the variable from the script. I means, the variable definition and use is transparent to the user.
I just tried QTP and TestComplete both on a same but small case, basically, user launch the browser, login and click some links and then logout and close the browser.
QTP:
Browser("JMap Admin").Page("JMap Admin").WebEdit("username").Set "administrator"
Browser("JMap Admin").Page("JMap Admin").Link("Login").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("heading").Link("Tools").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("center").Link("Deployment").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("heading_2").Link("Logout").Click
Browser("JMap Admin").Page("JMap Admin").Sync
Window("Windows Internet Explorer").Close
TestComplete:
Dim iexplore
Dim table
Dim page
TestedApps.Page1.Run
Set iexplore = Aliases.IEXPLORE
Call iexplore.ToUrl("http://192.168.0.218:8080/jmapadmin/login.jsp?error=not_logged_in")
Set table = iexplore.pageJmapAdmin.formTheform.tableLoginpanel
Call table.cell.textboxUsername.SetText("administrator")
Call table.cell1.linkJavascriptSubmit.textnodeLogin.Click(10, 11)
Set page = iexplore.pageJmapAdmin1
Set table = page.frameHeading.panelToolbarBox.panelM.panelToolbar.table
table.cellToolbarTools.linkTools.Click
Call page.frameCenter.panelElementBox.panelM.table.cell.table.cell.linkAppDeploymentJsp.textnodeDeployment.Click(82, 9)
table.cell.linkLogout.Click
page.Wait
iexplore.IEFrame.Close
My feeling is QTP's script is more concise, user doesn't need much care on defining variable and passing value. Also seems QTP hided the hierarchy of browser from the script. It's interesting. Maybe only QTP knows how they can do that.
That's not a question. Just curious somewhat. You don't need put any words here. :)
Whatever, thanks for your clear and specific explanation!
Lucien
I read through your answer for a couple of times. You explain very clearly. That greatly makes sense here.
When it comes to variable, it just reminded me of one interesting thing when i tried QTP as recording script. It's always wierd for me, cause looks like QTP hided the variable from the script. I means, the variable definition and use is transparent to the user.
I just tried QTP and TestComplete both on a same but small case, basically, user launch the browser, login and click some links and then logout and close the browser.
QTP:
Browser("JMap Admin").Page("JMap Admin").WebEdit("username").Set "administrator"
Browser("JMap Admin").Page("JMap Admin").Link("Login").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("heading").Link("Tools").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("center").Link("Deployment").Click
Browser("JMap Admin").Page("JMap Admin_2").Frame("heading_2").Link("Logout").Click
Browser("JMap Admin").Page("JMap Admin").Sync
Window("Windows Internet Explorer").Close
TestComplete:
Dim iexplore
Dim table
Dim page
TestedApps.Page1.Run
Set iexplore = Aliases.IEXPLORE
Call iexplore.ToUrl("http://192.168.0.218:8080/jmapadmin/login.jsp?error=not_logged_in")
Set table = iexplore.pageJmapAdmin.formTheform.tableLoginpanel
Call table.cell.textboxUsername.SetText("administrator")
Call table.cell1.linkJavascriptSubmit.textnodeLogin.Click(10, 11)
Set page = iexplore.pageJmapAdmin1
Set table = page.frameHeading.panelToolbarBox.panelM.panelToolbar.table
table.cellToolbarTools.linkTools.Click
Call page.frameCenter.panelElementBox.panelM.table.cell.table.cell.linkAppDeploymentJsp.textnodeDeployment.Click(82, 9)
table.cell.linkLogout.Click
page.Wait
iexplore.IEFrame.Close
My feeling is QTP's script is more concise, user doesn't need much care on defining variable and passing value. Also seems QTP hided the hierarchy of browser from the script. It's interesting. Maybe only QTP knows how they can do that.
That's not a question. Just curious somewhat. You don't need put any words here. :)
Whatever, thanks for your clear and specific explanation!
Lucien
Related Content
- 2 years ago
- 11 months ago
- 2 years ago
- 4 years ago