I want to check my page style is in particular format or not like photocentric,thumbnails etc...For example if I have choosen my page to be displayed as in the thumbnail format.First, i have choosen the template style and then i need to assert the page is in thumbnail style or not.It dynamically generates the id and classname.How can i get the dynamically generated className.My code is like below
//Click Thumbnails
pubDriver.findElement(By.cssSelector("img[alt=Template-option-thumbnails]")).click();
pubDriver.findElement(By.id("saveForm")).click();
//Check if the Page has been in thumbnail style template
WebElement thumbnailStyle = wait.until(ExpectedConditions.presenceOfElementLocated(By.className("thumbnails")));
Assert.assertTrue(thumbnailStyle.isDisplayed());
sleep(1000);
If I give above coding for assertion,it throws the following error message. Because I have applied style template format earlier and then I took className from there.
Timed out after 10 seconds waiting for presence of element located by: By.className: thumbnails
I am getting the following things after applying the template style format,so I don't know how to grab className dynamically from here
<div ng-class="layout" ng-switch-default="" class="ng-scope thumbnails">
<div ng-switch="" on="layout">
<!-- thumbnails template -->