Skip to content

Instantly share code, notes, and snippets.

View tarun3kumar's full-sized avatar

Tarun Kumar tarun3kumar

View GitHub Profile
@tarun3kumar
tarun3kumar / softassertion.java
Created January 4, 2012 06:52
Soft Assertion
package com.yahoo.test.library;
import org.testng.Assert;
import org.testng.Reporter;
import com.thoughtworks.selenium.SeleneseTestBase;
public class CustomVerification extends SeleneseTestBase {
private StringBuffer verificationErrors;
@tarun3kumar
tarun3kumar / seleniumc#test.cs
Created January 4, 2012 06:46
Selenium C# test
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
@tarun3kumar
tarun3kumar / seemailverify.java
Last active July 26, 2020 23:28
Selenium email verification
import javax.mail.Authenticator;
import javax.mail.Flags;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.internet.InternetAddress;
import javax.mail.search.FromTerm;
@tarun3kumar
tarun3kumar / updatesauceLabsresults.java
Created January 3, 2012 19:20
Update SauceLabs Results using Selenium2/WebDriver
@AfterMethod(alwaysRun = true)
public void shutDownDriver(ITestResult result) throws IOException {
// Update SauceLabs result
if(testbed.equals("saucelab")) {
String jobID = ((RemoteWebDriver)driver).getSessionId().toString();
SauceREST client = new SauceREST("username", "key");
Map<String, Object>sauceJob = new HashMap<String, Object>();
sauceJob.put("name", "Test method: "+result.getMethod().getMethodName());
if(result.isSuccess()) {