Esempio n. 1
0
        private void initObjectModels()
        {
            // initializing footer objects
            terms         = new Terms(browser);
            privacy       = new Privacy(browser);
            security      = new Security(browser);
            status        = new Status(browser);
            help          = new Help(browser);
            footerLogo    = new pageObjectModels.footer.Logo(browser);
            contactGitHub = new ContactGitHub(browser);
            api           = new API(browser);
            training      = new Training(browser);
            shop          = new Shop(browser);
            footerBlog    = new pageObjectModels.footer.Blog(browser);
            about         = new About(browser);

            // initializing explore objects
            integrations = new Integrations(browser);
            showcases    = new Showcases(browser);
            trending     = new Trending(browser);

            // initializing header objects
            headerLogo = new pageObjectModels.header.Logo(browser);
            personal   = new Personal(browser);
            openSource = new OpenSource(browser);
            business   = new Business(browser);
            explore    = new Explore(browser);
            pricing    = new Pricing(browser);
            headerBlog = new pageObjectModels.header.Blog(browser);
            support    = new Support(browser);
            searchBar  = new pageObjectModels.header.SearchBar(browser);
            signIn     = new SignIn(browser);
            signUp     = new SignUp(browser);

            // initializing main objects
            signUpUsername  = new SignUpUsername(browser);
            signUpEmail     = new SignUpEmail(browser);
            signUpPassword  = new SignUpPassword(browser);
            signUpSubmit    = new SignUpSubmit(browser);
            signUpForGitHub = new SignUpForGitHubButton(browser);

            // initializing pricing objects
            joinGitHubForFree    = new JoinGitHubForFree(browser);
            upgradeAccount       = new UpgradeAccount(browser);
            createOrganization   = new CreateOrganization(browser);
            startEnterpriseTrial = new StartEnterpriseTrial(browser);

            // initializing blog objects
            featured      = new Featured(browser);
            allPosts      = new AllPosts(browser);
            newFeatures   = new NewFeatures(browser);
            engineering   = new Engineering(browser);
            enterprise    = new Enterprise(browser);
            conferences   = new Conferences(browser);
            meetups       = new Meetups(browser);
            newHires      = new NewHires(browser);
            watercooler   = new Watercooler(browser);
            blogSearchBar = new pageObjectModels.blog.SearchBar(browser);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            NewFeatures feature = new NewFeatures();

            feature.GetStudentsInfoWithGrade(feature.student.First());
            //Console.WriteLine (GetBrowserName (Browser.IE));
            //IWebDriver driver = new Chrome ();
            //driver.FindElement ();
            //driver.SendKeysWithSpChar ("executeautomation", "!!!");
            //CollectionsExample.GenericCollectionsWithCustomClass ();

            //      Delegate examples C#1.0
            //Printer p = DelegateTry.PrintValue_1;
            //p ("executeautomation");

            //      Delegate examples C#2.0
            //Printer p = delegate ( string values )
            //    {
            //        Console.WriteLine ($"The value printed inline: {values}");
            //        };
            //p ("executeautomation");

            //      Delegate examples C#3.0
            //Printer p = ( values ) => { Console.WriteLine ($"The value printed from Lambda expression: {values}"); };
            //p ("executeautomation");

            //      C#3.5
            //Func<string, string> p = delegate ( string values )
            //    {
            //        return values;
            //        };

            //Console.WriteLine ($"The value from Func<> delegates is: {p ("executeautomation")}");

            //Action<string> actionP = delegate ( string values )
            //    {
            //        Console.WriteLine ($"The value from Action<> is: {values}");
            //        };

            //Action<string> actionWithLambda = values =>
            //{
            //    Console.WriteLine ($"The value from Action<> Lambda is: {values}");
            //};

            //actionP ("executeautomation");
            //actionWithLambda ("executeautomation");

            Console.Read();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            NewFeatures newFeatures = new NewFeatures();
            // var studentInfo = newFeatures.ReturnStudentInfo();
            //Console.WriteLine("The info of the Student : " + studentInfo);
            // (string name, int age, int grate)= newFeatures.ReturnStudentInfo();
            //if (age < 40)
            // {
            //   Console.WriteLine(name + " " + age + " " + grate);
            // }
            // else
            // {
            //    Console.WriteLine(" What a F**k?");
            // }
            // newFeatures.StudentInfo(out string name, out int age, out int grate);
            //Console.WriteLine($" Student with name {name} have age {age} and grate {grate}");


            //newFeatures.GetStudentInfo(newFeatures.Student.First());

            //Delegate example for 2.0
            // Printer p = delegate (string Print)
            //{
            //    Console.WriteLine($"The value I need to print :{Print}");
            //};

            //p("Chica");
            // Delegate example for 1.0
            //Printer p = DelegateTry.PrintV;
            //p("Opa Chica");
            // MetodsFromClass.GenericCollectionCustomeClass();
            //MetodsFromClass.GenericCollection();
            //Console.WriteLine(MetodsFromClass.GetBrowsers(Browser.Chrome));
            Student s = new Student("Sooo");

            //{
            //    Name = "Steve"
            // };
            // Console.WriteLine(s.GetStudentName());
            // Opachicka

            s.PrintName();
            Console.ReadLine();
        }
Esempio n. 4
0
        //Entry point of your program
        public static void Main(string[] args)
        {
            //Console.WriteLine(GetBrowserName(Browser.IE)); //stronly-typed code

            //IWebDriver driver = new Chrome();

            //driver.SendKeysWithSplChar("executeautomation", "!!!");

            //CollectionExample.GenericCollectionsWithCustomClass();

            ////C# 3.5
            //Func<string, string> p = delegate (string values)
            //{
            //    return values;
            //};

            //Console.WriteLine($"The value from Func<> delegates is this {p("ExecuteAutomation")}");


            //Action<string> actionP = delegate (string values)
            //{
            //    Console.WriteLine($"The value from Action<> delegates is this {values}");
            //};

            //Action<string> actionwithLambda = values => { Console.WriteLine($"The value from Action<> lambda is :{values}"); };

            //actionP("ExecuteAutomation");

            //actionwithLambda("ExecuteAutomation");

            //Delegate Example C# 3.0
            //Printer p = (values) => { Console.WriteLine($"The value printed from Lambda Expression is {values}"); };
            //p("ExecuteAutomation");

            //Delegate Example C# 2.0
            //Printer p = delegate (string values)
            //{
            //    Console.WriteLine($"The value printed inline :{values}");
            //};

            //p("ExecuteAutomation");

            //Delegate Examples - C# 1.0
            //Printer p = DelegateTry.PrintValue1;

            //p("ExecuteAutomation");


            NewFeatures feature = new NewFeatures();

            //feature.GetStudentsInfoWithGrade(feature.student.Where(x => x.Grade == "SuperFirst").First());

            //(string StudentName, int StudentAge, string StudentGrade) = feature.ReturnStudentInfo();

            //if(StudentAge == 40)
            //    Console.WriteLine($"The Student with {StudentName} & Age {StudentAge} & Grade {StudentGrade}");


            //feature.GetStudentsDetailS(out string name, out int age, out string grade);

            //Console.WriteLine($"Student with name {name} has age {age} with grade {grade}");


            Students s = new Students("Karthik");

            //Console.WriteLine($"Name of student is: {s.GetStudentName()}");


            s.PrintName();

            Console.Read();
        }