File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,12 @@ async function selectAgentPolicy({ page }) {
6464 const hosts = await page . isVisible ( 'text="Existing hosts"' ) ;
6565 if ( hosts ) {
6666 await page . click ( 'text="Existing hosts"' ) ;
67- await page . click ( '[data-test-subj="agentPolicySelect"]' ) ;
68- await page . click ( 'text="Elastic-Agent (elastic-package)"' ) ;
67+ if ( semver . satisfies ( stackVersion , '>=8.2.0' ) ) {
68+ await page . click ( '[data-test-subj="agentPolicySelect"]' ) ;
69+ await page . click ( 'text="Elastic-Agent (elastic-package)"' ) ;
70+ } else {
71+ await page . selectOption ( '[data-test-subj="agentPolicySelect"]' , { label : 'Elastic-Agent (elastic-package)' } ) ;
72+ }
6973 await page . waitForSelector ( 'text="Elastic-Agent (elastic-package)"' ) ;
7074 }
7175 await page . click ( '[data-test-subj="packagePolicyNameInput"]' ) ;
You can’t perform that action at this time.
0 commit comments