Forum Discussion
Hi,
> still it is not working.
What exactly does not work?
Assuming that XPath-es are correct, I think that condition is missed for the Next_Button.
I would expect something like this:
...
var Next_Button = Aliases.browser.pageName.FindElement("//a[((contains(concat(' ',@class,' '),'ui-paginator-next ')) and not(contains(concat(' ',@class,' '),' ui-state-disabled')))]");
if (Next_Buton.Exists)
Next_Button.click();
else
hasNext = false;
...
AlexKaras The script fails as at the last page where the button is disabled also the TestComplete looks for the below object. It doesn't go inside else block
var Next_Button = Aliases.browser.pageName.FindElement("//a[((contains(concat(' ',@class,' '),'ui-paginator-next ')) and not(contains(concat(' ',@class,' '),' ui-state-disabled')))]");