Forum Discussion

MarkSchofer's avatar
MarkSchofer
Frequent Contributor
3 years ago
Solved

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





  • Marsha_R's avatar
    Marsha_R
    3 years ago

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

7 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    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's avatar
      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.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

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