Skip to content

Instantly share code, notes, and snippets.

@zevnull
zevnull / SolutionsOverviewUtils.java
Created May 20, 2013 12:37
Get set of NSDs from config file
/**
* Get set of NSDs from config file
*
* @return set of NSDs from config file
*/
public Set<String> getNSDsSetFromConfig()
{
DMLogger.methodStarted();
String jsonTxt = "";
@zevnull
zevnull / FileSystemView.java
Created May 18, 2013 07:35
Draft ... need refactoring !!!!
package com.ddn.autotest.ui.primitives;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
@zevnull
zevnull / SolutionsOverviewUtils.java
Created May 17, 2013 06:56
Get list of Solutions Overview names from config file
/**
* Get list of Solutions Overview names from config file
*
* @return List<String> - Solutions Overview names
* @throws Exception
*/
public List<String> getSolutionsOverviewNamesFromConfig() throws Exception
{
DMLogger.methodStarted();
// TODO add path for QH DM2Web config (system-config.json)
@zevnull
zevnull / SolutionsOverviewUtils.java
Created May 17, 2013 06:54
Get list of Solutions Overview names from config file
/**
* Get list of Solutions Overview names from config file
*
* @return List<String> - Solutions Overview names
* @throws Exception
*/
public List<String> getSolutionsOverviewNamesFromConfig() throws Exception
{
DMLogger.methodStarted();
// TODO add path for QH DM2Web config (system-config.json)
@zevnull
zevnull / Point.java
Created May 7, 2013 12:36
Create screenshot for element
BrowserFactory.getExistentWebDriver().switchTo().frame( "outerFrame" );
WebElement ele =
BrowserFactory.getExistentWebDriver().findElement( By.cssSelector( "div#sfahciops > .flot-overlay" ) );
File screenshot = ( ( TakesScreenshot ) BrowserFactory.getExistentWebDriver() ).getScreenshotAs( OutputType.FILE );
BufferedImage fullImg = ImageIO.read( screenshot );
Point point = ele.getLocation();
int eleWidth = ele.getSize().getWidth();
@zevnull
zevnull / ParseImg.java
Created May 7, 2013 08:03
Parse image
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class ParseImg extends Component
{
@zevnull
zevnull / ExtendedFieldDecorator.java
Created April 15, 2013 14:52
ExtendedFieldDecorator
package com.ddn.autotest.ui.primitives;
import java.lang.reflect.Field;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.pagefactory.DefaultElementLocatorFactory;
import org.openqa.selenium.support.pagefactory.DefaultFieldDecorator;
import org.openqa.selenium.support.pagefactory.ElementLocator;