-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
bugSomething isn't workingSomething isn't working
Description
saveScreenshot() allows passing any extension into path parameter and no errors are thrown. IMO, before making a screenshot, it must be verified that filename has .png extension
Here's an example script
import static testUI.UIOpen.open;
import static testUI.Utils.By.byCssSelector;
import static testUI.elements.TestUI.E;
import org.testng.annotations.Test;
public class Testing {
@Test
public void test() {
open("https://example.com");
E(byCssSelector("")).saveScreenshot("test.png"); // valid screenshot
E(byCssSelector("")).saveScreenshot("test.y4m"); // invalid screenshot extension
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working