0

I am trying to automate spreadJS application using selenium web driver java. I have found something like this,

js.executeScript("var spread = new GcSpread.Sheets.Workbook(document.getElementById('ss'));"); 

And I tried the same after launching the browser from eclipse. Do we need to add any JavaScript libraries for this since it is showing the error as GcSpread not defined.

Arun J
  • 687
  • 4
  • 14
  • 27
Asha
  • 1
  • did you add the SJS script referenced to the page? – GrapeCity Team Sep 16 '19 at 11:18
  • Hi team, Could you please tell me where we can add the reference.? how we can get the reference? I have created the below codes driver.get("https://www.grapecity.com/demos/spread/JS/TutorialSample/Showcase/financialKPIs/purejs"); js.executeScript("window.testSpread = new GC.Spread.Sheets.findControl(document.querySelector(\"[gcuielement=\'gcSpreaad\']\"))"); /* get value of cell 0, 0 of active sheet */ js.executeScript("return window.testSpread.getActiveSheet().getValue(0,0);"); The DOM object driver.findElement(By.xpath("//*[@id='ss']")) is also returning null for me – Asha Sep 16 '19 at 16:48
  • This is working fine..there was an iframe which was creating the problem. Thank you – Asha Sep 22 '19 at 00:53

0 Answers0