1

I'm getting the below error when using selenium webdriver 2.48 (c#), safari driver 2.48.0 and safari 5.1.7 on windows:

System.InvalidCastException : Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type System.Collections.Generic.Dictionary`2[System.St ring,System.Object]'.

Does anyone know how to resolve this?

Sadik Ali
  • 1,129
  • 10
  • 26
quldude
  • 507
  • 5
  • 16
  • Can you provide more details on this? Where is this exception thrown, at what does the code look like trying to invoke it -- also, what config or settings are being used? – David Pine Mar 19 '16 at 01:30
  • I'm getting the error here... IWebDriver driver = new SafariDriver(); I followed the steps mentioned here: https://github.com/SeleniumHQ/selenium/wiki/SafariDriver – quldude Mar 19 '16 at 02:53
  • It looks like if I install webdriver and safari extension v2.45.0, everything works fine. But I need it to work with v2.48 as I use some functionality in that dll. Ref --> http://stackoverflow.com/questions/14618243/using-selenium-webdriver-and-safari – quldude Mar 19 '16 at 13:54
  • What specific functionality? – David Pine Mar 19 '16 at 13:59
  • For eg the following functions are not there in v2.45: ExpectedConditions.ElementToBeClickable ExpectedConditions.InvisibilityOfElementLocated – quldude Mar 19 '16 at 14:10

1 Answers1

1

Finally got it to work with webdriver v2.47 and safari extension v2.48.

quldude
  • 507
  • 5
  • 16
  • Hi can you please tell me are you still able to run test cases on Safari? Did you still using webdriver 2.47? Didn't you upgrade to the Webdriver 2.53.0? Thanks – Sudeepthi Apr 15 '16 at 12:58
  • I'm not using Safari right now. But I had got something to work as per my answer above. – quldude Apr 19 '16 at 22:18
  • Thank you for the response. I have to automate it, so just wanted to confirm it with you before starting any automation. – Sudeepthi Apr 20 '16 at 09:12