Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Release the current Pokemon.
 /// </summary>
 public static void ReleaseCurrentPokemon()
 {
     ElementHelpers.ClickFirstElementByXPath("//a[contains(@href, 'Delete')]");
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Click the submit button by xpath.
 /// </summary>
 protected override void OnSubmit()
 {
     ElementHelpers.ClickFirstElementByXPath(Constants.SubmitXPath);
 }
Ejemplo n.º 5
0
 /// <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 + "']");
 }