Attempting to click a button on a webpage with the given HTML code:
<html lang="en" webdriver="true">
<head>
<body class="scbody" style="background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAKCAYAAAB10jRKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBJREFUeNpEyqERADAIBMGbbwSH+qhA/6UR... // The shared code
<p>The crucial portion of the code is this:</p>
<pre><code> <a class="action actionLink" aria-describedby="141494853656_title" aria-label="Remove" href="http://cart.payments.ebay.com/sc/rfc?iref=8460053414" data-irefid="8460053414">Remove</a>
<span class="mr10 ml10 linkClr">|</span>
<a class="action actionLink" aria-describedby="141494853656_title" aria-label="Save for later" href="http://cart.payments.ebay.com/sc/sfl?iref=8460053414" data-irefid="8460053414">Save for later</a>
I considered using the aria-describeby
attribute to dynamically store an item for later like so:
".//*[@aria-describedby=" + "'" + itemID + "_title']/div[2]/div/div/a[2]"
However, it's not functioning as expected. Where am I going wrong?
Keep in mind that there could be multiple items and identifying a specific one solely relies on the itemID since other attributes are generated dynamically.
Thank you