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()





1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: Why Would A script Record Differently

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

View solution in original post

7 REPLIES 7
Marsha_R
Community Hero

Re: Why Would A script Record Differently

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?

MarkSchofer
Frequent Contributor

Re: Why Would A script Record Differently

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.

Marsha_R
Community Hero

Re: Why Would A script Record Differently

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

MarkSchofer
Frequent Contributor

Re: Why Would A script Record Differently

No you can not.

Marsha_R
Community Hero

Re: Why Would A script Record Differently

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

View solution in original post

MarkSchofer
Frequent Contributor

Re: Why Would A script Record Differently

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.

Marsha_R
Community Hero

Re: Why Would A script Record Differently

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.

cancel
Showing results for 
Search instead for 
Did you mean: