Code Examples Cut from Polyglot Automation talk given at QA Fest
full video: https://www.youtube.com/watch?v=D4w8btYlbRY
full presentation: http://www.slideshare.net/yashaka/polyglot-automation-qa-fest-2015
9. public class Tasks {
...
public static void visit() {
open("https://todomvc4tasj.herokuapp.com/");
}
public static void filterActive(){
$(By.linkText("Active")).click();
}
public static void filterCompleted(){
$(By.linkText("Completed")).click();
}
public static void add(String... taskTexts) {
for(String text: taskTexts){
$("#new-todo").setValue(text).pressEnter();
}
}
...
}
10. public static class Tasks
{
...
public static void Visit()
{
Open ("https://todomvc4tasj.herokuapp.com/");
}
public static void FilterActive ()
{
S (By.LinkText ("Active")).Click ();
}
public static void FilterCompleted ()
{
S (By.LinkText ("Completed")).Click ();
}
public static void Add(params string[] taskTexts)
{
foreach (var text in taskTexts)
{
S ("#new-todo").SetValue (text).PressEnter ();
}
}
...
}