forked from community/product-iots
parent
0ce1d75c61
commit
ef9c3dfe70
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||
* Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.wso2.iot.integration.ui.pages;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.NoSuchElementException;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
public class UIConstants {
|
||||
public static long webDriverTimeOut = 10;
|
||||
public static long webDriverTime = 60;
|
||||
public static int threadTimeout = 1000;
|
||||
|
||||
public static boolean isElementPresent(Log log, WebDriver driver, By by) {
|
||||
try {
|
||||
WebDriverWait wait = new WebDriverWait(driver, webDriverTime);
|
||||
wait.until(ExpectedConditions.presenceOfElementLocated(by));
|
||||
driver.findElement(by);
|
||||
return true;
|
||||
} catch (NoSuchElementException e) {
|
||||
log.error(by.toString() + " is not present");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,4 @@
|
||||
package org.wso2.iot.integration.ui.pages.samples;
|
||||
|
||||
/**
|
||||
* Created by menaka on 3/4/16.
|
||||
*/
|
||||
public class SampleAnalyticsPage {
|
||||
}
|
||||
|
Loading…
Reference in new issue