Here is the way I do the job when I must use GUI scripting.
I start with the first level in the UI elements chain
tell application "System Events" to tell application process "Safari" --"MyApplication"
set frontmost to true
tell window 1
class of every UI element
-->{splitter group, button, button, button, group, button, toolbar}
end tell
end tell
then I add code grabbing the second level
tell application "System Events" to tell application process "Safari" --"MyApplication"
set frontmost to true
tell window 1
class of every UI element
-->{splitter group, button, button, button, group, button, toolbar}
tell first splitter group
class of every UI element
--> {splitter, tab}
end tell
end tell
end tell
Then I continue to add levels one by one so I quickly reach the wanted level :
tell application "System Events" to tell application process "Safari" --"MyApplication"
set frontmost to true
tell window 1
class of every UI element
-->{splitter group, button, button, button, group, button, toolbar}
tell first splitter group
class of every UI element
--> {splitter, tab}
tell last UI element
class of every UI element
--> {group}
tell first UI element
class of every UI element
--> {group}
tell first UI element
class of every UI element
--> {scroll area}
tell first UI element
class of every UI element
--> {UI element, scroll bar}
tell first UI element
class of every UI element
--> {UI element, scroll bar}
tell group 2
class of every UI element
--> {static text}
properties of first static text
--> {minimum value:missing value, orientation:missing value, position:{2273, -181}, class:static text, role description:"texte", accessibility description:"", focused:false, title:"", size:{112, 11}, value:"Sunday, March 20, 2016", help:"", enabled:true, maximum value:missing value, role:"AXStaticText", entire contents:{}, subrole:missing value, selected:false, name:"Sunday, March 20, 2016", description:""}
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
Yvan KOENIG running El Capitan 10.11.3 in French (VALLAURIS, France) dimanche 20 mars 2016 10:00:22