Package de.xima.fc.e2e.junit.selenide
Class WebFormScript
- java.lang.Object
-
- de.xima.fc.e2e.junit.selenide.WebFormScript
-
public final class WebFormScript extends Object
Calls the test helper functions that the E2E container plugin injects into every formcycle form aswindow.xmTest(seeform-script.js). The current page of the driver must be a formcycle form.- Since:
- 8.5.7
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetRepetitions(com.codeborne.selenide.SelenideDriver driver, String name, int count)Sets the number of repetitions of a repeated form element or container.static voidsetUploadToContent(com.codeborne.selenide.SelenideDriver driver, String name, int index, String content, String fileName, String contentType)Sets an upload element to a file with the given text content.static voidsetUploadToGeneratedImage(com.codeborne.selenide.SelenideDriver driver, String name, int index, String seed, String fileName, String contentType)Sets an upload element to an image generated by the browser from the given seed.
-
-
-
Method Detail
-
setRepetitions
public static void setRepetitions(com.codeborne.selenide.SelenideDriver driver, String name, int count)Sets the number of repetitions of a repeated form element or container.- Parameters:
driver- The Selenide driver that controls the browser.name- Name of the repeated form element or container.count- The number of repetitions to set.
-
setUploadToContent
public static void setUploadToContent(com.codeborne.selenide.SelenideDriver driver, String name, int index, String content, String fileName, String contentType)Sets an upload element to a file with the given text content.- Parameters:
driver- The Selenide driver that controls the browser.name- Name of the upload element.index- Index of the repetition, for repeated upload elements;0otherwise.content- Text content of the file.fileName- File name to use.contentType- Content type to use for the file.
-
setUploadToGeneratedImage
public static void setUploadToGeneratedImage(com.codeborne.selenide.SelenideDriver driver, String name, int index, String seed, String fileName, String contentType)Sets an upload element to an image generated by the browser from the given seed. The same seed always results in the same image (300x150 pixels), but the encoded file may differ between browsers.- Parameters:
driver- The Selenide driver that controls the browser.name- Name of the upload element.index- Index of the repetition, for repeated upload elements;0otherwise.seed- Seed for generating the image.fileName- File name to use.contentType- Content type of the image, which determines its format, such asimage/png.
-
-