@FindBy(id="importBtn")
private WebElementFacade modalImportButton;
public void loadFileFrom(String filename){
upload(filename).to(modalImportButton);
}
@Step
public void load_file_from_location(String filename){
nomenclatorClientiPage.loadFileFrom(filename);
}
nomenclatorClientiSteps.load_file_from_location("C:\\SmartBill\\Serenity Auto\\sbc-tests\\src\\test\\java\\smartbill\\automation\\com\\utils\\test documents\\Clienti.xls");
public NewCompanyPage(WebDriver driver) { super(driver); }
--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public void loadFileFrom(String filename){
getDriver().switchTo().frame(uploadIFrame);
upload(filename).to(fileImportInputId);
getDriver().switchTo().defaultContent();
}
public void loadFileFrom(String filename){
try {
getDriver().switchTo().frame(uploadIFrame);
}catch (Exception e) {
System.out.println(e);
}
upload(filename).to(fileImportInputId);
getDriver().switchTo().defaultContent();
}
public WebElement jQueryFind(String selector) {
return (WebElement) evaluateJavascript("return $('" + selector + "').get(0)");
}
public void loadFileFrom(String filename){
WebElement frame = jQueryFind("#upload_frame");
getDriver().switchTo().frame(frame);
WebElement fileInput = jQueryFind("#id_Filedata");
upload(filename).to(fileInput);
getDriver().switchTo().defaultContent();
}
@Step
public void load_file_from_location(String filename){
nomenclatorClientiPage.loadFileFrom(filename);
}
nomenclatorClientiSteps.load_file_from_location("C:\\...\\src\\test\\java\\project\\automation\\com\\utils\\test documents\\Clienti.xls");
I've rewrote the part that might have given you the impression that I use manual testing combined with auto-testing... I never do that because indeed it would defeat the purpose of automation ;)
Hope everything is clear now.
Cheers,
Mugur