Ask a Question

Why Would A script Record Differently

SOLVED
MarkSchofer
Frequent Contributor

Why Would A script Record Differently

I had these scripts that worked perfectly fine and then I had the audacity to take two days of vacation

The scripts no longer work today and when I went to re-record (It is not what i want to to) they recorded differently
I realize that an instance may change -   however I can not see it changing all that much
Keyword converted to script

This script worked perfectly

It no longer does

def EnterQ1():

Browsers.Item[btChrome].Run("https://internal.pers.state.or.us/web/html/isd/TOS/QA/qas_resources.shtml")

Aliases.browser.BrowserWindow.Click(228, 141)

Aliases.browser.BrowserWindow.Maximize()

Aliases.browser.pageQasTestLinks.linkQat1Clarety2.Click()

Aliases.browser.pageLogInToOregonPersQat1.Wait()

Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.textboxUserId.Click()    Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.textboxUserId.SetText("schkent1")

Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.textboxUserId.Keys("[Tab]")

#Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.passwordboxPassword.SetText(Project.Variables.Password3)

#Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.passwordboxPassword.SetText(Project.Variables.Password4)

Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.passwordboxPassword.SetText(Project.Variables.Password1)

Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.submitbuttonLogIn.ClickButton()

 

RE-Reqcorded and now working fine

def EnterQ1_():

  Browsers.Item[btChrome].Run("https://internal.pers.state.or.us/web/html/isd/TOS/QA/qas_resources.shtml")

Aliases.browser.BrowserWindow.Click(193, 133)

Aliases.browser.BrowserWindow.Maximize()

Aliases.browser.pageQasTestLinks.linkQat1Clarety.Click()

Aliases.browser.pageAuth.Wait()

Aliases.browser.pageAuth.formKcFormLogin.textboxUserId.Click()

Aliases.browser.pageAuth.formKcFormLogin.textboxUserId.SetText("schkent1")

Aliases.browser.pageAuth.formKcFormLogin.textboxUserId.Keys("[Tab]")

Aliases.browser.pageAuth.formKcFormLogin.passwordboxPassword.SetText(Project.Variables.Clarety_V)

Aliases.browser.pageAuth.formKcFormLogin.submitbuttonLogIn.ClickButton()





7 REPLIES 7
Marsha_R
Community Hero

Clearly TC wanted to go with you on vacation and you left it behind instead!  Terrible!  🙂

 

I see the differences, e.g.

Aliases.browser.pageLogInToOregonPersQat1.formKcFormLogin.textboxUserId.Click()   

vs

Aliases.browser.pageAuth.formKcFormLogin.textboxUserId.Click()

 

Do the old aliases still exist in your project?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
MarkSchofer
Frequent Contributor

Thank you for your response.

 

Apparently the old aliases do exist, however does that really matter. When this script was recorded (then modified in python) was only three weeks ago. If a script works I do not care all that much how it was generated.   -Maybe I should.  It is frustrating to have to re record scripts.  From the out set I see no foreshadowing that these would become obsolete.  I do take all TC patches on my instances and wondering if that is even wise.

If you go to one of the old aliases in name mapping, can you still highlight the correct object from there?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
MarkSchofer
Frequent Contributor

No you can not.

That leads me to believe that your app under test changed.  Was there an update for that while you were out?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
MarkSchofer
Frequent Contributor

One of two things happened.

I took a smart Bear patch on Monday Morning.

We did have a deployment and that may be the issue however I do not see why it would cause it but it is the most likely culprit.

An app upgrade would cause it if the objects ended up with different names.  A user of the application wouldn't notice anything but TC will hit that bump right away.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: