Skip to content

Instantly share code, notes, and snippets.

View stevenxi's full-sized avatar

Steven.Xi stevenxi

View GitHub Profile
Thread.Sleep(2000);//Wait the extension about page open
driver.Close(); //Close about page
driver.SwitchTo().Window(driver.WindowHandles[0]);
driver.Navigate().GoToUrl("chrome-extension://idgpnmonknjnojddfkpgkljpfnnfcklj/popup.html");
driver.ExecuteScript("document.getElementsByClassName('mdc-text-field__input')[0].value = 'MY_HEADER';");
driver.ExecuteScript(" var evt = document.createEvent('HTMLEvents');evt.initEvent('input', false, true);document.getElementsByClassName('mdc-text-field__input')[0].dispatchEvent(evt);");
@stevenxi
stevenxi / gist:ed150b482b8c87b41f67e3c7e53973ff
Created May 28, 2019 07:37
Wrapper for auto-delete queue for EasyNetQ
public class SafeBusWrapper : IDisposable
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
private readonly IAdvancedBus _advancedBus;
private readonly IBus _bus;
public SafeBusWrapper(string connecitonString, Action<IServiceRegister> registerServices)
{
@stevenxi
stevenxi / gist:34821c465eb09f72b5b1d3cc8023ffde
Created May 28, 2019 07:37
Wrapper for auto-delete queue for EasyNetQ
public class SafeBusWrapper : IDisposable
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
private readonly IAdvancedBus _advancedBus;
private readonly IBus _bus;
public SafeBusWrapper(string connecitonString, Action<IServiceRegister> registerServices)
{
@stevenxi
stevenxi / gist:fb0d842ec4f7063403578fba5bc99d3d
Created May 28, 2019 07:37
Wrapper for auto-delete queue for EasyNetQ
public class SafeBusWrapper : IDisposable
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
private readonly IAdvancedBus _advancedBus;
private readonly IBus _bus;
public SafeBusWrapper(string connecitonString, Action<IServiceRegister> registerServices)
{