/// <summary> /// Sets the sex field to a given sex. /// </summary> /// <param name="sex">sex to use</param> /// <returns>current add form for chaining</returns> public AddPokemonForm WithSex(string sex) { ElementHelpers.ClickFirstElementById("SelectedSexId"); ElementHelpers.ClickFirstElementByXPath(string.Format(Constants.OptionWithTextXPath, sex)); return(this); }
/// <summary> /// Sets the Pokeball field to a given pokeball. /// </summary> /// <param name="pokeball">pokeball to use</param> /// <returns>current add form for chaining</returns> public AddPokemonForm WithPokeball(string pokeball) { ElementHelpers.ClickFirstElementById("SelectedPokeballId"); ElementHelpers.ClickFirstElementByXPath(string.Format(Constants.OptionWithTextXPath, pokeball)); return(this); }
/// <summary> /// Release the current Pokemon. /// </summary> public static void ReleaseCurrentPokemon() { ElementHelpers.ClickFirstElementByXPath("//a[contains(@href, 'Delete')]"); }
/// <summary> /// Click the submit button by xpath. /// </summary> protected override void OnSubmit() { ElementHelpers.ClickFirstElementByXPath(Constants.SubmitXPath); }
/// <summary> /// View the Pokemon from Pokedex by given nickname. /// </summary> /// <param name="nickName">nickname to view</param> public static void ViewPokemonByNickname(string nickName) { ElementHelpers.ClickFirstElementByXPath("//h4[text()='Nickname: " + nickName + "']"); }