18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Clicking the correct link

SadanaSadana Members
edited July 2013 in Sahi - Open Source
Angular is really making me crazy and I think also many other person too.

My latest problem is the situation when on the page there is visible one button in one phase and then in another situation there is other button in the exactly same position.
This has worked earlier, but then developer made some change and now I'm not able to do the correct click anymore.

Here's the element list of those buttons.
<li class="right">
<a id="forwardButton" class="button" attribute="formbuttons.labelNext" ng:click="move("forward")" ng-hide="isLastTab ()" href="" style="display: none;">Next</a>
<a id="saveAndLockButton" class="button" attribute="formbuttons.labelSaveAndContinue" ng:click="storeForm("storeAndProceed")" ng-show="isLastNewTab() && writeAccess" href="" style="">Save and Continue</a>

Earlier I have been able to click those buttons by commands:
browser.link("Next").click();
browser.link("Save and Continue").click();

But now only the first one is working. The second one doesn't do clicking correct way. I verified by System.out.print() that It's really able to find the button. But when It's clicked it is doing some saving as it should but it doesn't continue from it. (After saving there should come more pages visible.) If I'm pausing the execution and clicking the button by myself via Sahi button is really clicked and more pages comes visible.

This sounds similar I had earlier in some text areas... even Sahi did the procedure there was something small in the end it did so that browser was not able to understand it correctly.

Best Answer

  • Answer ✓
    I solved this case. Developer had added same button to different tabs. So instead of clicking button on the active tab, Sahi clicked the button from the previous tab.
    By adding index to the button I managed to click the correct button.
This discussion has been closed.