👨🏼💻개발/셀레니움
셀레니움 - 특정 URL 차단하기
Janger
2022. 10. 11. 20:47
728x90
chromeOptions.AddArgument("--host-resolver-rules=MAP ssl.pstatic.net 127.0.0.1");
string strCmdText;
strCmdText = "/C ipconfig /flushdns";
System.Diagnostics.Process.Start("CMD.exe", strCmdText);
Thread.Sleep(3000);
URL의 DNS를 127.0.0.1로 설정해서 차단하는 방식이라 바로 적용하고 싶으면 dns를 초기화하는 명령어도 함께 써줘야 함
출처:
셀레니움 URL Blocking
Can I automate Chrome request blocking using Selenium-webdriver for Ruby?
I am a QA automation analyst responsible for testing a multi-platform online banking application. For our automation testing we use RubyMine suite with Gherkin/Cucumber, Ruby-scripted steps and Sel...
stackoverflow.com
Run Command Prompt Commands
https://stackoverflow.com/questions/1469764/run-command-prompt-commands
Run Command Prompt Commands
Is there any way to run command prompt commands from within a C# application? If so how would I do the following: copy /b Image1.jpg + Archive.rar Image2.jpg This basically embeds an RAR file wi...
stackoverflow.com
728x90