Skip to content

Instantly share code, notes, and snippets.

Vatslau VatslauX

Block or report user

Report or block VatslauX

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@VatslauX
VatslauX / ImapServiceTemplate
Created Jan 25, 2019
Basic class to connect IMAP and handle read-write operations
View ImapServiceTemplate
import com.sun.xml.xsom.impl.scd.Iterators;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Assert;
import javax.mail.*;
import javax.mail.search.FlagTerm;
import javax.mail.search.SearchTerm;
import java.io.IOException;
import java.util.ArrayList;
@VatslauX
VatslauX / Dictconfig example
Created Jun 21, 2018 — forked from kien-truong/Dictconfig example
Example log dictionary config in pure python
View Dictconfig example
logconfig = {
"version": 1,
"disable_existing_loggers": 0,
"root": {
"level": "DEBUG",
"handlers": [
"console",
"file",
"debugfile"
]
View Zephyr_versions
class Version(object):
def __init__(self, value, archived, label):
self.value = value
self.archived = archived
self.label = label
class VersionSchema(Schema):
value = fields.String()
archived = fields.Boolean()
label = fields.String()
View AutoItUploadRuntimeArgs
Sleep(1000)
#include <WinAPIFiles.au3>
Local Const $sPath1 = "src/test/java/UploadFiles/"&$CmdLine[1]
Local Const $fullPath = _WinAPI_GetFullPathName($sPath1)
WinWaitActive("File Upload")
Send($fullPath)
Send("{ENTER}")
Sleep(1000)
Func kill()
@VatslauX
VatslauX / AutoItUpload
Created May 8, 2017
AutoIt - udload file in Windows Firefox with relative classpath
View AutoItUpload
#include <WinAPIFiles.au3>
Local Const $sPath1 = 'src/test/java/UploadFiles/googledoc.gdoc'
Local Const $fullPath = _WinAPI_GetFullPathName($sPath1)
WinWaitActive("File Upload")
Send($fullPath)
Send("{ENTER}")
@VatslauX
VatslauX / junitRetryOnFail
Created May 7, 2017
Junit rule retry test if failed - Just past before tests: @rule public Retry retry = new Retry(3); //"3" is attempts quantity
View junitRetryOnFail
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
/**
* Created by Viachaslau Balashevich.
* https://www.linkedin.com/in/viachaslau
*/
public class Retry implements TestRule {
private int retryCount;
View BrowserSettings
public static int testBrowser = 2;
public static void setBrowser() {
switch (testBrowser) {
case 1:
pageLoadStrategy =
browser = CHROME;
startMaximized = false;
// browserSize = "1700x1000";
ChromeDriverManager.getInstance().setup();
// getWebDriver().manage().window().maximize();
You can’t perform that action at this time.