MDL-38025 behat: Adding generic manipulation methods

Also required modifications in the affected
steps definitions
MDL-38025 behat: Updating tests according to modified steps
MDL-38025 behat: Compliant with moodlechecker and codechecker