Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
wait_for_page_load
on selecting that index fails, because nothing changes on selecting the already-selected option. So only actually select the option if it's not already selected.print_url
was wrong for digital invoices. The most robust way to handle this is just to use the link href instead of manually constructing a URL which may get out of date. This requires verifying that we actually have the Invoice link instead of another link that containsorderId
in the href (e.g. "Order Details"). Currently I do this by checking the link text; I could instead do it by checking some contents of the href (though I'd have to check for different marker link contents for digital vs physical orders). Both approaches could be broken by website changes, but in this case looking for the text "Invoice" seems more reliable than relying on details of the URL format, which apparently already has changed once for digital invoices.Verified that these changes work for downloading both physical and digital order invoices.