cant click on a button

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
rholdberh
Posts: 27
Joined: Mon Jan 13, 2014 3:45 pm

cant click on a button

Post by rholdberh » Thu Jan 23, 2014 2:54 pm

Hi,
i am new to Ranorex so pls forgive my silly questions. I have a button:

<button class="inforFormButton gridButton delete" name="nameofthebutton" onclick="UIHandler.deleteExport(event, '4567asd', 'Completed1_140102094515')">Delete</button>

i defined Xpath position to this button, but when i try to click on it a got a mistake:

Item 'ExportToolTestsRepository.IDMExporter.DeleteButtonPath' is no Button.
The element does not support the required capability 'button'.

code from the repository:

_deletebuttonpathInfo = new RepoItemInfo(this, "DeleteButtonPath", ".//div[#'formerExportsTable']/div[4]/div[3]/div/div[1]//button[@innertext='Delete']", 30000, null, "00c4b1d4-e020-4e57-acaf-d55db3589559");

So if i understand well i am trying to click on a text on this button but it doesnt work for me.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: cant click on a button

Post by krstcs » Thu Jan 23, 2014 3:23 pm

Technically it is not a "Button", it is a "ButtonTag" object, since it appears to be HTML.

Try declaring the object as a ButtonTag instead of Button and see what happens.

Ranorex uses Button both for actual Button objects and as a short-hand for ButtonTag objects (which is a mistake in my opinion because of confusion like this).
Shortcuts usually aren't...

rholdberh
Posts: 27
Joined: Mon Jan 13, 2014 3:45 pm

Re: cant click on a button

Post by rholdberh » Thu Jan 23, 2014 3:32 pm

Thanks!! :D with ButtonTag it works good