@@ -110,6 +110,8 @@ func main() {
110110
111111 next (page )
112112
113+ // Initialize step counter
114+ stepNum := 6
113115 logrus .Info ("Download credentials" )
114116 client := resty .New ()
115117 err = downloadCredentials (page , client , filepath .Join (screenshotPath , "06-credentials.png" ))
@@ -118,17 +120,36 @@ func main() {
118120 }
119121
120122 next (page )
123+ stepNum ++
124+
125+ // Wait for page to load
126+ time .Sleep (3 * time .Second )
127+
128+ // Check if we're on Custom manifests page (4.22+) or Review page (< 4.22)
129+ customManifestsHeading , _ := page .Timeout (2 * time .Second ).ElementR ("h2" , "Custom manifests" )
130+ if customManifestsHeading != nil {
131+ logrus .Info ("Custom manifests page detected (OCP 4.22+)" )
132+ err = saveFullPageScreenshot (page , filepath .Join (screenshotPath , fmt .Sprintf ("%02d-custom-manifests.png" , stepNum )))
133+ if err != nil {
134+ log .Fatalf ("failed custom manifests screenshot: %v" , err )
135+ }
136+ next (page ) // Advance to review
137+ stepNum ++
138+ } else {
139+ logrus .Info ("No Custom manifests page (OCP < 4.22), already on review page" )
140+ }
121141
122142 logrus .Info ("Review and start cluster installation" )
123- err = review (page , filepath .Join (screenshotPath , "07 -review.png" ))
143+ err = review (page , filepath .Join (screenshotPath , fmt . Sprintf ( "%02d -review.png", stepNum ) ))
124144 if err != nil {
125145 log .Fatalf ("failed review page: %v" , err )
126146 }
127147
128148 logrus .Info ("Cluster installation started successfully." )
129149 page .MustElementR ("h2" , "Installation progress" )
130150
131- err = waitForClusterConsoleLink (page , filepath .Join (screenshotPath , "08-installation-progress" ))
151+ stepNum ++
152+ err = waitForClusterConsoleLink (page , filepath .Join (screenshotPath , fmt .Sprintf ("%02d-installation-progress" , stepNum )))
132153 if err != nil {
133154 log .Fatalf ("%v" , err )
134155 }
@@ -216,7 +237,7 @@ func downloadCredentials(page *rod.Page, client *resty.Client, path string) erro
216237 page .MustElement ("#credentials-download-agreement" ).MustClick ()
217238 time .Sleep (5 * time .Second )
218239
219- page .MustElementR ("button" , "Download credentials" ).MustWaitEnabled ()
240+ page .MustElementR ("button" , "Download credentials" ).MustWaitEnabled (). MustClick ()
220241
221242 err = saveFullPageScreenshot (page , path )
222243 if err != nil {
0 commit comments