How to click cell button

Posted by: rwawrowicz on 8 April 2022, 3:30 am EST

  • Posted 8 April 2022, 3:30 am EST

    Hi,
    I'm implementing an automated test and I have to click a button to add a row in a table. How can I do it?
    Should I use commandManger().execute?
    workbook.commandManager().execute({cmd:"commandName",row:13,col:3,sheetName:"Sheet Name"})
    If yes, how can I know what name of command is assigned to this button?
  • Replied 10 April 2022, 9:02 pm EST

    Hi Rafal,

    SpreadJS provides enough APIs to get the position of the button drawn on the canvas. Based on the framework, you can perform the click operation at the position of the button. For example, you can get the size and location of the cell rectangle using getCellRect method. Modify the position accordingly and perform the click operation.

    Could you please explain how you have implemented the button so that we can have a better understanding of your use case and we could assist you accordingly?

    It would be better if you could share a small sample.

    getCellRect method: https://www.grapecity.com/spreadjs/docs/latest/online/SpreadJS~GC.Spread.Sheets.Worksheet~getCellRect.html

    Regards

    Ankit
  • Replied 12 April 2022, 6:31 pm EST

    Hi,

    Currently, macros are not supported by SJS, it is already in our backlog(Internal tracking ID: SJS-2295) to support this feature but we currently do not have an ETA for the same.
    We will let you know about any updates regarding the same.

    Regards

    Ankit
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels