Mix test failing

Can someome pls guide what could be the cause of Mix test suddenly failing which was working fine till now. Getting the below error for the failed tests:-

‘’’’
29) test When not logged in as a admin-user admin log in is required (MyFutureNowWeb.AdminListUsersFeatureTest)
test/my_future_now_web/features/admin/admin_list_user_feature_test.exs:11
** (FunctionClauseError) no function clause matching in Wallaby.Experimental.Selenium.WebdriverClient.cast_as_element/2

 The following arguments were given to Wallaby.Experimental.Selenium.WebdriverClient.cast_as_element/2:
 
     # 1
     %Wallaby.Session{driver: Wallaby.Experimental.Chrome, id: "d4460757168d6f779933ec889235115c", screenshots: [], server: Wallaby.Experimental.Chrome.Chromedriver, session_url: "http://localhost:39791/session/d4460757168d6f779933ec889235115c", url: "http://localhost:39791/session/d4460757168d6f779933ec889235115c"}
 
     # 2
     {"error", "invalid session id"}
	 
	 Attempted function clauses (showing 2 out of 2):
 
     defp cast_as_element(parent, -%{"ELEMENT" => id}-)
     defp cast_as_element(parent, -%{"element-6066-11e4-a52e-4f735466cecf" => id}-)
 
 code: |> assert_has_flash(text: "You must log in", level: :warning)
 stacktrace:
   (wallaby 0.23.0) lib/wallaby/experimental/selenium/webdriver_client.ex:566: Wallaby.Experimental.Selenium.WebdriverClient.cast_as_element/2
   (elixir 1.10.0) lib/enum.ex:1400: anonymous fn/3 in Enum.map/2
   (stdlib 3.11.2) maps.erl:232: :maps.fold_1/3
   (elixir 1.10.0) lib/enum.ex:2127: Enum.map/2
   (wallaby 0.23.0) lib/wallaby/experimental/selenium/webdriver_client.ex:43: Wallaby.Experimental.Selenium.WebdriverClient.find_elements/2
   (wallaby 0.23.0) lib/wallaby/driver/log_checker.ex:6: Wallaby.Driver.LogChecker.check_logs!/2
   (wallaby 0.23.0) lib/wallaby/browser.ex:1140: anonymous fn/3 in Wallaby.Browser.execute_query/2
   (wallaby 0.23.0) lib/wallaby/browser.ex:146: Wallaby.Browser.retry/2
   test/my_future_now_web/features/admin/admin_list_user_feature_test.exs:2: MyFutureNowWeb.AdminListUsersFeatureTest.assert_has_flash/2
   test/my_future_now_web/features/admin/admin_list_user_feature_test.exs:14: (test)

‘’’’’

It was working fine few days back and not working from today. Not sure what has changed.

I fixed the issue. It was because the Chrome driver version has upgraded and I was using the old version.

4 Likes