1

As you can see here I am using

((JavascriptExecutor)seleniumdriver).
executeScript("return arguments[0].attributes);", webElement);

to get all attributes from webElement, but it gives me this error:

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Maximum call stack size exceeded
  (Session info: chrome=43.0.2357.134)
  (Driver info: chromedriver=2.17.340124 (8cdfc496335a58cfb8bdd672c7dce0c23456384b),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4.25 seconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 02:56:46'
System info: host: 'sina-PC', ip: '10.55.0.131', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Community
  • 1
  • 1
LoveLovelyJava
  • 735
  • 4
  • 9
  • 21

1 Answers1

1

Looks like it was missing a '('.

((JavascriptExecutor)seleniumdriver)
    .executeScript("return (arguments[0].attributes);", webElement);
Ori Dar
  • 18,687
  • 5
  • 58
  • 72
mauiTester
  • 31
  • 1
  • 1
  • 4