I'm trying to automate using cypress tests on spread JS that is built on canvas. I learnt that the spreadJS instance should be initialised but have no luck as of now. Do we have to use the spreadJS key as well to initialise or can it be done without?
Furthermore, I did come across some selenium and protractor codes but they weren't very helpful to what i'm trying to achieve. I wonder if it's just me. Appreciate if you could share any code snippet related to my query above.
Steps followed:
Following is a sample code snippet used in attempt to verifying the instance but unfortunately no luck.
let spread = new GC.Spread.Sheets.findControl(<host>);
let sheet = spread.getActiveSheet().getRange(5, 10);
console.log(sheet)
Actual Result: I get the error "TypeError: Cannot read property 'getActiveSheet' of undefined"
Expected Results: Should be able to retrieve data from the spreadJS that is built in on a website
findControl is a static method, no need for "new" something like this var spread = GC.Spread.Sheets.findControl(document.getElementById('ss'));
hope this helps.
GrapeCity SpreadJS team.
Most complete Excel-like spreadsheet for JavaScript
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.