I want the applescript to select text field 2 of sheet 1 of window "App Store" of application process "App Store",but it does not work, why?
<p>I want  the applescript  to  select text field 2 of sheet 1 of window "App Store" of application process "App Store"   ,but it does not work, why? what is wrong? please help me. thank you!
When the   Apple ID is already exists,  I want  to select  text field 2 (text field  of Apple ID),  and then clear the old  app id , keystroke  "  another app id" 
<a href="https://i.stack.imgur.com/Bi78V.png" rel="nofollow noreferrer">enter image description here</a></p>

<p>This  is  my   applescript :</p>

<pre><code>tell application "App Store" to activate
    delay 1
    tell application "System Events"
        try
            click menu item 12 of menu 1 of menu bar item 4 of menu bar 1 of application process "App Store"
        end try
    end tell
    delay 1

    tell application "System Events"
        delay 2
        select text field 2 of sheet 1 of window "App Store" of application process "App Store"
        key code 51 using {command down, shift down}
        keystroke " another app id"
        keystroke tab
        keystroke "password"
        key code 36
    end try
end tell
</code></pre>