I am running a test to test pages in the responsive design view in Firefox. Expectation is, that the page should display/shouldn't display a few elements based on the size of the screen.
To verify that, I'd like to change resolutions dynamically to validate presence or absence of elements and leave the responsive design view once I am done with my assertions.
I understand that resolutions can be changed by updating the desired capabilities or even with firefox profiles. Just wondering if it's possible to access elements in the row highlighted in the screenshot? I don't think find element would work as these icons are outside the html. Are there other options ?
public class Test {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.com");
Actions action1 = new Actions(driver);
action1.keyDown(Keys.COMMAND);
action1.keyDown(Keys.ALT);
action1.sendKeys("m");
action1.keyUp(Keys.COMMAND);
action1.keyUp(Keys.ALT);
action1.perform();
driver.quit();
}
}
Environment: OS - Mac Selenium version - 2.48.2 Firefox version - 41