Appium XCUITest driver 5.0.0 has removed these methods, and they now return errors. The only workaround right now is to install the previous driver version, 4.35.0.
(Appium UIAutomator2 driver still supports them, but they will certainly be removed there as well in the future)