Skip to content

Fix Create Host button locator for new UI empty state - #2494

Open
nacoool wants to merge 1 commit into
SatelliteQE:6.19.zfrom
nacoool:fix-host-create-button-empty-state
Open

Fix Create Host button locator for new UI empty state#2494
nacoool wants to merge 1 commit into
SatelliteQE:6.19.zfrom
nacoool:fix-host-create-button-empty-state

Conversation

@nacoool

@nacoool nacoool commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The new Hosts page empty state uses OUIA ID
'empty-state-secondary-action-button' instead of 'create-host-button'.
Update the XPath to match either ID, with text filtering to distinguish
Create Host from Register Host which shares the same OUIA ID.

@LadislavVasina1

Copy link
Copy Markdown
Contributor

This feels like a bug to me, I dont really like this particular ID rename, could you check that please @nacoool

@nacoool nacoool added 6.19.z No-CherryPick PR doesnt need CherryPick to previous branches labels Jul 29, 2026
Comment thread airgun/views/host.py
Comment on lines +231 to +237
new = Text(
".//div[@id='foreman-page']//a["
"@data-ouia-component-id='create-host-button' or "
"(@data-ouia-component-id='empty-state-secondary-action-button' "
"and normalize-space(.)='Create Host')"
"]"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just

Suggested change
new = Text(
".//div[@id='foreman-page']//a["
"@data-ouia-component-id='create-host-button' or "
"(@data-ouia-component-id='empty-state-secondary-action-button' "
"and normalize-space(.)='Create Host')"
"]"
)
new = Text(
".//a["
"@data-ouia-component-id='create-host-button' or "
"@data-ouia-component-id='empty-state-secondary-action-button' ""
"]"
)

and can we use better naming than new? Specially when there is a new_ui_button down there :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.19.z No-CherryPick PR doesnt need CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants