16 changed files with 564 additions and 137 deletions
@ -0,0 +1,32 @@ |
|||
package org.thingsboard.server.msa.ui.pages; |
|||
|
|||
import org.openqa.selenium.WebDriver; |
|||
import org.openqa.selenium.WebElement; |
|||
import org.thingsboard.server.msa.ui.base.AbstractBasePage; |
|||
|
|||
public class AlarmDetailsViewElements extends AbstractBasePage { |
|||
public AlarmDetailsViewElements(WebDriver driver) { |
|||
super(driver); |
|||
} |
|||
|
|||
private static final String ASSIGN_FIELD = "//mat-label[contains(text(),'Assignee')]/parent::label/following-sibling::input"; |
|||
private static final String USER_FROM_DROP_DOWN = "//div[@class='user-display-name']/span[text() = '%s']"; |
|||
private static final String CLOSE_VIEW_BTN = "//mat-dialog-container//mat-icon[contains(text(),'close')]/parent::button"; |
|||
private static final String UNASSIGNED_BTN = "//div[@role='listbox']//mat-icon[text() = 'account_circle']/following-sibling::span"; |
|||
|
|||
public WebElement assignField() { |
|||
return waitUntilElementToBeClickable(ASSIGN_FIELD); |
|||
} |
|||
|
|||
public WebElement userFromAssignDropdown(String emailOrName) { |
|||
return waitUntilElementToBeClickable(String.format(USER_FROM_DROP_DOWN, emailOrName)); |
|||
} |
|||
|
|||
public WebElement closeViewBtn() { |
|||
return waitUntilElementToBeClickable(CLOSE_VIEW_BTN); |
|||
} |
|||
|
|||
public WebElement unassignedBtn() { |
|||
return waitUntilElementToBeClickable(UNASSIGNED_BTN); |
|||
} |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
package org.thingsboard.server.msa.ui.pages; |
|||
|
|||
import org.openqa.selenium.WebDriver; |
|||
|
|||
public class AlarmDetailsViewHelper extends AlarmDetailsViewElements{ |
|||
public AlarmDetailsViewHelper(WebDriver driver) { |
|||
super(driver); |
|||
} |
|||
|
|||
public void assignAlarmTo(String emailOrName) { |
|||
assignField().click(); |
|||
userFromAssignDropdown(emailOrName).click(); |
|||
} |
|||
|
|||
public void unassignedAlarm() { |
|||
assignField().click(); |
|||
unassignedBtn().click(); |
|||
} |
|||
} |
|||
@ -1,110 +0,0 @@ |
|||
package org.thingsboard.server.msa.ui.tests; |
|||
|
|||
import org.testng.Assert; |
|||
import org.testng.annotations.AfterMethod; |
|||
import org.testng.annotations.BeforeClass; |
|||
import org.testng.annotations.Test; |
|||
import org.thingsboard.server.common.data.id.AlarmId; |
|||
import org.thingsboard.server.common.data.id.DeviceId; |
|||
import org.thingsboard.server.common.data.id.UserId; |
|||
import org.thingsboard.server.msa.prototypes.DevicePrototypes; |
|||
import org.thingsboard.server.msa.ui.base.AbstractDriverBaseTest; |
|||
import org.thingsboard.server.msa.ui.pages.AlarmHelper; |
|||
import org.thingsboard.server.msa.ui.pages.DevicePageHelper; |
|||
import org.thingsboard.server.msa.ui.pages.LoginPageHelper; |
|||
import org.thingsboard.server.msa.ui.pages.SideBarMenuViewHelper; |
|||
import org.thingsboard.server.msa.ui.utils.DataProviderCredential; |
|||
import org.thingsboard.server.msa.ui.utils.EntityPrototypes; |
|||
|
|||
import static org.assertj.core.api.Assertions.assertThat; |
|||
|
|||
public class AssignDetailsTab extends AbstractDriverBaseTest { |
|||
|
|||
AlarmId alarmId; |
|||
DeviceId deviceId; |
|||
UserId userId; |
|||
String deviceName; |
|||
SideBarMenuViewHelper sideBarMenuView; |
|||
AlarmHelper alarmPage; |
|||
DevicePageHelper devicePage; |
|||
|
|||
@BeforeClass |
|||
public void generateAlarm() { |
|||
new LoginPageHelper(driver).authorizationTenant(); |
|||
sideBarMenuView = new SideBarMenuViewHelper(driver); |
|||
alarmPage = new AlarmHelper(driver); |
|||
devicePage = new DevicePageHelper(driver); |
|||
} |
|||
|
|||
@AfterMethod |
|||
public void deleteAlarm() { |
|||
testRestClient.deleteAlarm(alarmId); |
|||
testRestClient.deleteDevice(deviceId); |
|||
if (userId != null) { |
|||
testRestClient.deleteUser(userId); |
|||
} |
|||
} |
|||
|
|||
@Test(dataProviderClass = DataProviderCredential.class, dataProvider = "assignTo") |
|||
public void assignAlarmTo(String user) { |
|||
deviceName = testRestClient.postDevice("", DevicePrototypes.defaultDevicePrototype("")).getName(); |
|||
deviceId = testRestClient.getDeviceByName(deviceName).getId(); |
|||
alarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId)).getId(); |
|||
|
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignTo(user); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(user).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void reassignAlarm() { |
|||
testRestClient.postCustomer(EntityPrototypes.defaultCustomerPrototype("TestCustomer")); |
|||
userId = testRestClient.postUser(EntityPrototypes.defaultUser(getCustomerByName("TestCustomer").getId())).getId(); |
|||
deviceName = testRestClient.postDevice("", DevicePrototypes.defaultDevicePrototype("")).getName(); |
|||
deviceId = testRestClient.getDeviceByName(deviceName).getId(); |
|||
alarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId, userId)).getId(); |
|||
|
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignTo("customer@thingsboard.org"); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser("customer@thingsboard.org").isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void searchByEmail() { |
|||
deviceName = testRestClient.postDevice("", DevicePrototypes.defaultDevicePrototype("")).getName(); |
|||
deviceId = testRestClient.getDeviceByName(deviceName).getId(); |
|||
alarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId)).getId(); |
|||
|
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignBtn().click(); |
|||
alarmPage.searchUserField().sendKeys("customer@thingsboard.org"); |
|||
alarmPage.setUsers(); |
|||
|
|||
assertThat(alarmPage.getUsers()).contains("customer@thingsboard.org"); |
|||
alarmPage.assignUsers().forEach(u -> assertThat(u.isDisplayed()).isTrue()); |
|||
} |
|||
|
|||
@Test |
|||
public void searchByName() { |
|||
String name = "usik"; |
|||
|
|||
userId = testRestClient.postUser(EntityPrototypes.defaultUser(getCustomerByName("Customer A").getId(), name)).getId(); |
|||
deviceName = testRestClient.postDevice("", DevicePrototypes.defaultDevicePrototype("")).getName(); |
|||
deviceId = testRestClient.getDeviceByName(deviceName).getId(); |
|||
alarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId)).getId(); |
|||
|
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignBtn().click(); |
|||
alarmPage.searchUserField().sendKeys(name); |
|||
alarmPage.setUsers(); |
|||
|
|||
assertThat(alarmPage.getUsers()).contains(name); |
|||
alarmPage.assignUsers().forEach(u -> assertThat(u.isDisplayed()).isTrue()); |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
package org.thingsboard.server.msa.ui.tests.assignee; |
|||
|
|||
import org.thingsboard.server.msa.ui.base.AbstractDriverBaseTest; |
|||
|
|||
abstract public class AbstractAssignByCustomerTest extends AbstractDriverBaseTest { |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
package org.thingsboard.server.msa.ui.tests.assignee; |
|||
|
|||
import org.openqa.selenium.WebElement; |
|||
import org.testng.annotations.AfterClass; |
|||
import org.testng.annotations.AfterMethod; |
|||
import org.testng.annotations.BeforeClass; |
|||
import org.testng.annotations.BeforeMethod; |
|||
import org.testng.annotations.DataProvider; |
|||
import org.thingsboard.server.common.data.id.AlarmId; |
|||
import org.thingsboard.server.common.data.id.CustomerId; |
|||
import org.thingsboard.server.common.data.id.DeviceId; |
|||
import org.thingsboard.server.common.data.id.TenantId; |
|||
import org.thingsboard.server.common.data.id.UserId; |
|||
import org.thingsboard.server.msa.ui.base.AbstractDriverBaseTest; |
|||
import org.thingsboard.server.msa.ui.pages.AlarmDetailsViewHelper; |
|||
import org.thingsboard.server.msa.ui.pages.AlarmHelper; |
|||
import org.thingsboard.server.msa.ui.pages.CustomerPageHelper; |
|||
import org.thingsboard.server.msa.ui.pages.DevicePageHelper; |
|||
import org.thingsboard.server.msa.ui.pages.LoginPageHelper; |
|||
import org.thingsboard.server.msa.ui.pages.SideBarMenuViewHelper; |
|||
import org.thingsboard.server.msa.ui.utils.EntityPrototypes; |
|||
|
|||
import java.util.List; |
|||
|
|||
import static org.thingsboard.server.msa.ui.base.AbstractBasePage.random; |
|||
|
|||
abstract public class AbstractAssignTest extends AbstractDriverBaseTest { |
|||
|
|||
protected AlarmId alarmId; |
|||
protected AlarmId assignedAlarmId; |
|||
protected AlarmId propageteAlarmId; |
|||
protected AlarmId propageteAssigneAlarmId; |
|||
protected AlarmId tenantAssigneAlarmId; |
|||
protected DeviceId deviceId; |
|||
protected UserId userId; |
|||
protected UserId userWithNameId; |
|||
// protected TenantId tenantId = testRestClient.getTenants(pageLink).getData().get(0).getId();
|
|||
protected CustomerId customerId; |
|||
protected String deviceName; |
|||
protected SideBarMenuViewHelper sideBarMenuView; |
|||
protected AlarmHelper alarmPage; |
|||
protected DevicePageHelper devicePage; |
|||
protected AlarmDetailsViewHelper alarmDetailsView; |
|||
CustomerPageHelper customerPage; |
|||
|
|||
protected String name = "User"; |
|||
protected String customerTitle = "Customer" + random(); |
|||
protected String userEmail = random() + "@thingsboard.org"; |
|||
protected String userWithNameEmail = random() + "@thingsboard.org"; |
|||
protected String alarm = "Test alarm 1"; |
|||
protected String assignedAlarm = "Test alarm 2"; |
|||
protected String propagateAlarm = "Test propagated alarm 1"; |
|||
protected String propagateAssignedAlarm = "Test propagated alarm 2"; |
|||
|
|||
@BeforeClass |
|||
public void generateTestEntities() { |
|||
new LoginPageHelper(driver).authorizationTenant(); |
|||
sideBarMenuView = new SideBarMenuViewHelper(driver); |
|||
alarmPage = new AlarmHelper(driver); |
|||
devicePage = new DevicePageHelper(driver); |
|||
alarmDetailsView = new AlarmDetailsViewHelper(driver); |
|||
customerPage = new CustomerPageHelper(driver); |
|||
|
|||
customerId = testRestClient.postCustomer(EntityPrototypes.defaultCustomerPrototype(customerTitle)).getId(); |
|||
userId = testRestClient.postUser(EntityPrototypes.defaultUser(userEmail, getCustomerByName(customerTitle).getId())).getId(); |
|||
userWithNameId = testRestClient.postUser(EntityPrototypes.defaultUser(userWithNameEmail, getCustomerByName(customerTitle).getId(), name)).getId(); |
|||
deviceName = testRestClient.postDevice("", EntityPrototypes.defaultDevicePrototype("", customerId)).getName(); |
|||
deviceId = testRestClient.getDeviceByName(deviceName).getId(); |
|||
} |
|||
|
|||
@BeforeMethod |
|||
public void generateTestAlarms() { |
|||
if (getJwtTokenFromLocalStorage() == null) { |
|||
new LoginPageHelper(driver).authorizationTenant(); |
|||
} |
|||
alarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId, alarm)).getId(); |
|||
assignedAlarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId, assignedAlarm, userId)).getId(); |
|||
propageteAlarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId, propagateAlarm, true)).getId(); |
|||
propageteAssigneAlarmId = testRestClient.postAlarm(EntityPrototypes.defaultAlarm(deviceId, propagateAssignedAlarm, userId, true)).getId(); |
|||
|
|||
|
|||
} |
|||
|
|||
@AfterClass |
|||
public void deleteTestEntities() { |
|||
testRestClient.deleteDevice(deviceId); |
|||
testRestClient.deleteCustomer(customerId); |
|||
} |
|||
|
|||
@AfterMethod |
|||
public void deleteTestAlarms() { |
|||
testRestClient.deleteAlarm(alarmId); |
|||
testRestClient.deleteAlarm(assignedAlarmId); |
|||
testRestClient.deleteAlarm(propageteAlarmId); |
|||
testRestClient.deleteAlarm(propageteAssigneAlarmId); |
|||
} |
|||
|
|||
public void loginByUser(String userEmail) { |
|||
sideBarMenuView.customerBtn().click(); |
|||
customerPage.manageCustomersUserBtn(customerTitle).click(); |
|||
customerPage.getUserLoginBtnByEmail(userEmail).click(); |
|||
} |
|||
|
|||
@DataProvider |
|||
public Object[][] alarms() { |
|||
return new Object[][]{ |
|||
{alarm}, |
|||
{propagateAlarm}}; |
|||
} |
|||
|
|||
@DataProvider |
|||
public Object[][] assignedAlarms() { |
|||
return new Object[][]{ |
|||
{assignedAlarm}, |
|||
{propagateAssignedAlarm}}; |
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
package org.thingsboard.server.msa.ui.tests.assignee; |
|||
|
|||
public class AssignByCustomerTest extends AbstractAssignByCustomerTest{ |
|||
} |
|||
@ -0,0 +1,209 @@ |
|||
/** |
|||
* Copyright © 2016-2023 The Thingsboard Authors |
|||
* |
|||
* Licensed 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.thingsboard.server.msa.ui.tests.assignee; |
|||
|
|||
import org.junit.platform.commons.function.Try; |
|||
import org.openqa.selenium.html5.WebStorage; |
|||
import org.testng.Assert; |
|||
import org.testng.annotations.Test; |
|||
import org.thingsboard.server.msa.ui.utils.Const; |
|||
|
|||
import static org.assertj.core.api.Assertions.assertThat; |
|||
|
|||
public class AssignDetailsTab extends AbstractAssignTest { |
|||
|
|||
/*@BeforeMethod |
|||
public void openAlarmView() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
}*/ |
|||
|
|||
@Test(dataProvider = "alarms") |
|||
public void assignAlarmToYourself(String alarm) { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(alarm, Const.TENANT_EMAIL); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(Const.TENANT_EMAIL).isDisplayed()); |
|||
} |
|||
|
|||
@Test(dataProvider = "alarms") |
|||
public void assignAlarmToAnotherUser(String alarm) { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(alarm, userEmail); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(userEmail).isDisplayed()); |
|||
} |
|||
|
|||
@Test(dataProvider = "assignedAlarms") |
|||
public void unassignedAlarm(String assignedAlarm) { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.unassignedAlarm(assignedAlarm); |
|||
|
|||
Assert.assertTrue(alarmPage.unassigned(assignedAlarm).isDisplayed()); |
|||
} |
|||
|
|||
@Test(dataProvider = "assignedAlarms") |
|||
public void reassignAlarm(String assignedAlarm) { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(assignedAlarm, Const.TENANT_EMAIL); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(Const.TENANT_EMAIL).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void searchByEmail() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.searchAlarm(alarm, Const.TENANT_EMAIL); |
|||
alarmPage.setUsers(); |
|||
|
|||
assertThat(alarmPage.getUsers()).hasSize(1).contains(Const.TENANT_EMAIL); |
|||
alarmPage.assignUsers().forEach(u -> assertThat(u.isDisplayed()).isTrue()); |
|||
} |
|||
|
|||
@Test |
|||
public void searchByName() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.searchAlarm(alarm, name); |
|||
alarmPage.setUsers(); |
|||
|
|||
assertThat(alarmPage.getUsers()).hasSize(1).contains(name); |
|||
alarmPage.assignUsers().forEach(u -> assertThat(u.isDisplayed()).isTrue()); |
|||
} |
|||
|
|||
@Test |
|||
public void assignAlarmToYourselfFromDetails() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.alarmDetailsBtn(alarm).click(); |
|||
alarmDetailsView.assignAlarmTo(Const.TENANT_EMAIL); |
|||
alarmDetailsView.closeViewBtn().click(); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(Const.TENANT_EMAIL).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void assignAlarmToAnotherUserFromDetails() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.alarmDetailsBtn(alarm).click(); |
|||
alarmDetailsView.assignAlarmTo(userEmail); |
|||
alarmDetailsView.closeViewBtn().click(); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(userEmail).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void unassignedAlarmFromDetails() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.alarmDetailsBtn(assignedAlarm).click(); |
|||
alarmDetailsView.unassignedAlarm(); |
|||
alarmDetailsView.closeViewBtn().click(); |
|||
|
|||
Assert.assertTrue(alarmPage.unassigned(assignedAlarm).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void reassignAlarmFromDetails() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.alarmDetailsBtn(assignedAlarm).click(); |
|||
alarmDetailsView.assignAlarmTo(Const.TENANT_EMAIL); |
|||
alarmDetailsView.closeViewBtn().click(); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(Const.TENANT_EMAIL).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void assignAlarmToYourselfCustomer() { |
|||
loginByUser(userEmail); |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(alarm, userEmail); |
|||
clearStorage(); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(userEmail).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void reassignAlarmByCustomerFromAnotherCustomerUser() { |
|||
loginByUser(userWithNameEmail); |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(assignedAlarm, name); |
|||
clearStorage(); |
|||
|
|||
Assert.assertTrue(alarmPage.assignedUser(name).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void unassignedAlarmFromCustomer() { |
|||
loginByUser(userWithNameEmail); |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.unassignedAlarm(assignedAlarm); |
|||
clearStorage(); |
|||
|
|||
Assert.assertTrue(alarmPage.unassigned(assignedAlarm).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void unassignedAlarmFromAnotherUserFromCustomer() { |
|||
loginByUser(userEmail); |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.unassignedAlarm(assignedAlarm); |
|||
clearStorage(); |
|||
|
|||
Assert.assertTrue(alarmPage.unassigned(assignedAlarm).isDisplayed()); |
|||
} |
|||
|
|||
@Test |
|||
public void checkTheDisplayOfNamesEmailsFromCustomer() { |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignAlarmTo(alarm, Const.TENANT_EMAIL); |
|||
loginByUser(userEmail); |
|||
sideBarMenuView.goToDevicesPage(); |
|||
devicePage.openDeviceAlarms(deviceName); |
|||
alarmPage.assignBtn(alarm).click(); |
|||
try { |
|||
alarmPage.assertUsersForAssignIsNotPresent(); |
|||
} finally { |
|||
clearStorage(); |
|||
} |
|||
} |
|||
|
|||
public WebStorage getWebStorage() { |
|||
if (driver instanceof WebStorage) { |
|||
return (WebStorage) driver; |
|||
} else { |
|||
throw new IllegalArgumentException("This test expects the driver to implement WebStorage"); |
|||
} |
|||
} |
|||
|
|||
public void clearStorage() { |
|||
getWebStorage().getLocalStorage().clear(); |
|||
getWebStorage().getSessionStorage().clear(); |
|||
} |
|||
|
|||
} |
|||
Loading…
Reference in new issue