To match multiple possible ids, you could match the id by regexp. The regexp allows for multiple matching by using the |
.
Your page object accessor would be:
link(:upgrade_link, id: /^(Upgrade|difference)$/)
Note that the ^
and $
are used to ensure that the id exactly matches. Without them, you would match links with ids like 'Upgrade2', 'adifferenceb', etc.