コード例 #1
0
        public static void OrderByPriceAscendant()
        {
            SeleniumSetMethods.PerformMovement(Properties.driver, SeleniumGetMethods.GetElement(Properties.driver, "w7", "Id"));
            SeleniumSetMethods.Click(Properties.driver, "//*[@class='srp-sort__menu']/li[4]", "xpath");

            //printing first 5 results in console
            listproduct = SeleniumGetMethods.GetProductsFromList(Properties.driver, 5);

            foreach (Product element in listproduct)
            {
                PrintResults(element.GetTitle());
                PrintResults(element.GetPrice());
            }
        }