def METHOD_NAME(self):
    button_names = ["Horizontal", "Vertical"]
    keys_to_press = [AltKeyCode.D, AltKeyCode.W]
    axis_name = self.altdriver.find_object(By.NAME, "AxisName")
    axis_value = self.altdriver.find_object(By.NAME, "AxisValue")
    for button_name, key in zip(button_names, keys_to_press):
        self.altdriver.press_key(key, power=0.5, duration=1)
        assert axis_value.get_text() == "0.5"
        assert axis_name.get_text() == button_name