This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SwitchCaseExample | |
{ | |
public static void Main(String[] args) | |
{ | |
Console.WriteLine("Enter any of the 3 seasons Summer , Winter, Rainy "); | |
string season = Console.ReadLine(); | |
switch (season) { | |
case "Summer": | |
Console.WriteLine($"{season} lasts from March to May"); | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PalindromeCheck | |
{ | |
public static void Main(String[] args) | |
{ | |
// Palindrome -- Level | |
//1. Reverse string. | |
//2. Compare the reversedstring with actual string. | |
string actualString = "level"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RectangularArray | |
{ | |
public static void Main(String[] args) | |
{ | |
var rectangularArray = new int[,] { | |
{1,2,3 }, | |
{4,5,6 }, | |
{7,8,9} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JaggedArraySample | |
{ | |
public static void Main(String[] args) | |
{ | |
var jaggedArray = new int[][] { | |
new int[] {1,2,3 }, | |
new int[] {4,5,6,7 }, | |
new int[] {8,9,10,11,12} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringReversal | |
{ | |
public static void Main(String[] args) | |
{ | |
string courseName1 = "Automation"; | |
//Reversing String Approach -01 | |
for (int i = courseName1.Length-1;i>=0 ; i--) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using OpenQA.Selenium.Edge; | |
using WebDriverManager; | |
using WebDriverManager.DriverConfigs.Impl; | |
using OpenQA.Selenium.Support.UI; | |
namespace LearnSelenium { | |
public class SeleniumAllLocators { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DropDownSample { | |
public static void Main(string[] args) | |
{ | |
new DriverManager().SetUpDriver(new ChromeConfig()); | |
var driver = new ChromeDriver(); | |
driver.Navigate().GoToUrl("https://the-internet.herokuapp.com/dropdown"); | |
driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GoogleResults { | |
public static void Main(string[] args) { | |
new DriverManager().SetUpDriver(new ChromeConfig()); | |
var driver = new ChromeDriver(); | |
driver.Navigate().GoToUrl("https://www.google.com/"); | |
driver.Manage().Window.Maximize(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SeleniumSample { | |
public static void Main(string[] args) { | |
new DriverManager().SetUpDriver(new ChromeConfig()); | |
var driver = new ChromeDriver(); | |
driver.Navigate().GoToUrl("https://www.google.com/"); | |
driver.Manage().Window.Maximize(); | |
var search_field = driver.FindElement(By.Name("q")); | |
search_field.SendKeys("Selenium"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RightClickDoubleClick { | |
public static void Main(string[] args) { | |
new DriverManager().SetUpDriver(new ChromeConfig()); | |
var driver = new ChromeDriver(); | |
driver.Navigate().GoToUrl("https://demo.guru99.com/test/simple_context_menu.html"); | |
driver.Manage().Window.Maximize(); |