Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Is it possible to input a value into a table cell using Sahi OS?

tsivatsiva Members
edited September 2013 in Sahi - Open Source
I was trying to set values into a table cells on a page using _setValues () API as below. The script is playing back with no errors but i don't see the values in the cells. I can input the values manually into the cells. I have tried to input the values from the controller in the record mode but the values are not displaying in the cells on Application. What am I doing wrong here. I really appreciate if someone could advise me for resolving the issue.
_highlight(_row(34).cells[7]);
_click(_row(34).cells[6]);
_setValue(_row(34).cells[6], "5.99");
_click(_row(34).cells[7]);
_setValue(_row(34).cells[7], "5.00");
_click(_row(35).cells[6]);
_setValue(_row(35).cells[6], "15.99");
_click(_row(35).cells[6]);
_setValue(_row(35).cells[6], "15.99");
_click(_row(35).cells[7]);
_setValue(_row(35).cells[7], "15.00");

Best Answer

  • Hi tsiva,
    Is highlight in the first line working for you? Also, are these the same accessors that you got from Sahi controller while recording?

    Regards.

Answers

  • yes.. It was working the highlight and other accessors got from the controller..but i figured out the issue and fixed it... the fix was set two times with the same value in the same field to set the value in the field.
    _click(_div("0.00"));
    _setValue(_textbox("unitPrice"), "2.99");
    _setValue(_textbox("unitPrice"), "2.99");
    _click(_div("0.00"));
    _setValue(_textbox("labor"), "5.00");
    _setValue(_textbox("labor"), "5.00");
This discussion has been closed.