Interakce With Web Test NUnit Visual Studio 2022
This commit is contained in:
		
							
								
								
									
										43
									
								
								Readme.md
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								Readme.md
									
									
									
									
									
								
							@@ -1,43 +0,0 @@
 | 
			
		||||
# Rozcestník Lukáše Kaňky na tomto GitHub profilu
 | 
			
		||||
 | 
			
		||||
**Něco málo o mně:**
 | 
			
		||||
 | 
			
		||||
Jsem IT nadšenec s pozitivním přístupem k životu a vášní pro technologie. Propadl jsem testingu, kde jsem začal s manuálním testováním, ale více mě baví nástroje umožňující automatizaci, především Playwright. Vzdělávám se v dalších frameworcích umožňující automatizaci:
 | 
			
		||||
 | 
			
		||||
Selenium,
 | 
			
		||||
 | 
			
		||||
Selenide + Java, 
 | 
			
		||||
 | 
			
		||||
NUnit + C#,
 | 
			
		||||
 | 
			
		||||
Cypress.
 | 
			
		||||
 | 
			
		||||
**Kde všude mě najdete:**
 | 
			
		||||
 | 
			
		||||
[LinkedIn](https://www.linkedin.com/in/luk%C3%A1%C5%A1-ka%C5%88ka-b2a0a1a0/)
 | 
			
		||||
 | 
			
		||||
[Facebook](https://www.facebook.com/Kankys81)
 | 
			
		||||
 | 
			
		||||
[BlueSky](https://bsky.app/profile/kankys.bsky.social)
 | 
			
		||||
 | 
			
		||||
[Matodon](https://mastodon.arch-linux.cz/@Kankys)
 | 
			
		||||
 | 
			
		||||
**Seznam ropozitářů**
 | 
			
		||||
 | 
			
		||||
Zde najdeš seznam mých projektů v repozitářích s krátkým popiskem. Většina repozitářů se týká automatizovaného testování. V seznamu najdeš jen mé projekty které jsem sám dělat od nuly. Ostatní repozitáře jsou většinou volně přístupná videa z YouTube. Private repozitáře jsou většinou placené kurzy, kde je zákaz jejich sdílení.
 | 
			
		||||
 | 
			
		||||
C# (NUnit, MSTest, xUnit)
 | 
			
		||||
 | 
			
		||||
[GoogleNUnitProject](https://github.com/LukasKanka/.Net_C.Sharp_Test/tree/main/GoogleNUnitProject)--> Zde testuji své dovednosti na vyhledávači Google
 | 
			
		||||
 | 
			
		||||
[LukanNUnitProject](https://github.com/LukasKanka/.Net_C.Sharp_Test/tree/main/LukanNUnitProject)--> Zde píši automatizované testy na mém [blogu](https://lukan.cz/)
 | 
			
		||||
 | 
			
		||||
[Testing_Ubuntu](Testing_Ubuntu)--> Testování C# a .Net v Ubuntu
 | 
			
		||||
 | 
			
		||||
[ZiveNUnitProject](https://github.com/LukasKanka/.Net_C.Sharp_Test/tree/main/ZiveNUnitProject)--> Automatizované testování na webu [zive](https://www.zive.cz/)
 | 
			
		||||
 | 
			
		||||
[xUnit.NET](https://github.com/LukasKanka/.Net_C.Sharp_Test/tree/main/xUnit.NET)--> Automatizované testování v Frameworku xUnit
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -6,6 +6,7 @@ using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using OpenQA.Selenium.Interactions;
 | 
			
		||||
using OpenQA.Selenium.Support.UI;
 | 
			
		||||
 | 
			
		||||
namespace SeleniumNunitProject.Tests
 | 
			
		||||
{
 | 
			
		||||
@@ -21,32 +22,57 @@ namespace SeleniumNunitProject.Tests
 | 
			
		||||
 | 
			
		||||
            // click  default checkbox
 | 
			
		||||
            driver.FindElement(By.Id("my-check-2")).Click();
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // click radio button
 | 
			
		||||
            driver.FindElement(By.Id("my-radio-2")).Click();
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // right click
 | 
			
		||||
            var actions = new Actions(driver);
 | 
			
		||||
            var button = driver.FindElement(By.TagName("button"));
 | 
			
		||||
            actions.ContextClick(button).Perform();
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // double click
 | 
			
		||||
            var checkbox1 = driver.FindElement(By.Id("my-check-1"));
 | 
			
		||||
            actions.DoubleClick(checkbox1).Perform();
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // sendkeys input
 | 
			
		||||
            driver.FindElement(By.Id("my-text-id")).SendKeys(Guid.NewGuid().ToString());
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // text area
 | 
			
		||||
            var textArea = driver.FindElement(By.Name("my-textarea"));
 | 
			
		||||
            textArea.SendKeys(Guid.NewGuid().ToString());
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // clear
 | 
			
		||||
            //textArea.Clear();
 | 
			
		||||
            textArea.Clear();
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // select Dropdown (select)
 | 
			
		||||
            // rozbalovací menu
 | 
			
		||||
            var selectElement = driver.FindElement(By.Name("my-select"));
 | 
			
		||||
            var select = new SelectElement(selectElement);
 | 
			
		||||
 | 
			
		||||
            select.SelectByText("One");
 | 
			
		||||
            select.SelectByValue("2");
 | 
			
		||||
            select.SelectByIndex(3);
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
            // upload
 | 
			
		||||
            var filePath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".txt";
 | 
			
		||||
            File.WriteAllText(filePath, Guid.NewGuid().ToString());
 | 
			
		||||
            driver.FindElement(By.Name("my-file")).SendKeys(filePath);
 | 
			
		||||
            Thread.Sleep(2000);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
           //driver.Quit();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            driver.Quit();
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1 +1 @@
 | 
			
		||||
2006750491
 | 
			
		||||
603377410
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user