Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

Here I am getting error like "unknown command: cannot call non w3c standard command while in w3c mode" while extract page attribute [duplicate]

$
0
0

I have one web page which has HTML, javascript and iFrames. I am extracting attributes of HTML tags by below code for reference:

Dictionary<string, object> attributes = new Dictionary<string, object>();
try
{
   IJavaScriptExecutor javascriptDriver = (IJavaScriptExecutor)objBrowser;
   attributes = javascriptDriver.ExecuteScript("
      var items = {};   
      for (index = 0; index < arguments[0].attributes.length; ++index) { 
           items[arguments[0].attributes[index].name] = arguments[0].attributes[index].value }; 
      return items;", 
   objWebElement) as Dictionary<string, object>;
}

but I am getting error in attributes like mentioned in Title. Need help and support if anyone can help me on the same.


Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>