Shah
unread,Apr 30, 2009, 7:05:45 AM4/30/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to selenium-users...@googlegroups.com
Hi Folks,
I have an object when I click it the name changes (from buy to bought) and its greyout (disabled).
I need to check if it has been greyout - here is the html:
before disabled:
<input type="button" itemid="2:11775969$000011775969001" class="buyButton" title="Buy this item" id="ctl00_mainContent_productDetailContent_artistSinglesTab_albumProductDetails_musicBuy_buyButton_buyButtonControl" onclick="if (!window.buy) return false; buy.Updating(this);basket.AddItem('2:11775969','000011775969001');buy.CloseAllBuyPopups();return false;__doPostBack('ctl00$mainContent$productDetailContent$artistSinglesTab$albumProductDetails$musicBuy$buyButton$buyButtonControl','')" value="" name="ctl00$mainContent$productDetailContent$artistSinglesTab$albumProductDetails$musicBuy$buyButton$buyButtonControl"/>
After disabled:
<input type="button" itemid="2:11775969$000011775969001" class="buyButton *buyDisabled*" title="Buy this item" id="ctl00_mainContent_productDetailContent_artistSinglesTab_albumProductDetails_musicBuy_buyButton_buyButtonControl" onclick="if (!window.buy) return false; buy.Updating(this);basket.AddItem('2:11775969','000011775969001');buy.CloseAllBuyPopups();return false;__doPostBack('ctl00$mainContent$productDetailContent$artistSinglesTab$albumProductDetails$musicBuy$buyButton$buyButtonControl','')" value="" name="ctl00$mainContent$productDetailContent$artistSinglesTab$albumProductDetails$musicBuy$buyButton$buyButtonControl" *disabled*=""/>
Any suggestion what I can use for the xpath? I tried //input[@name="ctl00$mainContent$productDetailContent$artistSinglesTab$albumProductDetails$musicBuy$buyButton$buyButtonControl" and @class="buyButton buyDisabled" but it does not find the disabled (i.e bought) button just the previous buy button. Any suggestions?
Also is it possible to get the name of the button (i.e buy/bought)?
Thanks for any help.