Skip to content

Instantly share code, notes, and snippets.

View Sugrob57's full-sized avatar

Artem Sidoruk Sugrob57

View GitHub Profile
@Sugrob57
Sugrob57 / json
Last active November 25, 2022 15:19
WireNock.NET requests response sample
// GET https://wiremock-url.com/__admin/requests
[
{
"Guid": "9d1e7906-cf2e-4ca8-9fa3-1ade133835a2",
"Request": {
"ClientIP": "10.222.22.22",
"DateTime": "2022-11-21T10:35:41.5508475Z",
"Path": "/Subscriptions/v2.0/api/Subscription/notifyUsage",
"AbsolutePath": "/Subscriptions/v2.0/api/Subscription/notifyUsage",
"Url": "http://wiremock.my-site.com/Subscriptions/v2.0/api/Subscription/notifyUsage",
@Sugrob57
Sugrob57 / json
Created November 21, 2022 16:42
WireNock.NET request body
// POST/PUT https://wiremock-url.com/__admin/mappings
{
"Priority": null,
"Scenario": null,
"WhenStateIs": null,
"SetStateTo": null,
"Request": {
"ClientIP": null,
"Path": {
"Matchers": [
@Sugrob57
Sugrob57 / gist:54f67670a940493d50f7139a6800ee97
Last active March 5, 2020 11:19
Wait element displayed sample
var myElement = WaitUntilElementIsDisplayed(By.XPath(myElementXpath));
// дождаться пока элемент появится
public IWebElement WaitUntilElementIsDisplayed(By locator, TimeSpan? timeout = null)
{
timeout = timeout ?? ElementWaitingTimeout;
return WaitForElement(
() =>