如何在serenity-bdd框架中使用appium使用Androiddrier?

时间:2015-08-11 18:49:31

标签: android appium cucumber-jvm thucydides serenity-bdd

我正在使用带有cucumber-jvm的serenity-bdd作为我的测试框架。我想使用Appium在Android模拟器上运行我的测试。

Serenity-bdd默认情况下实例化打开firefox的webdriver。如何在android模拟器上执行我的webdriver测试?

1 个答案:

答案 0 :(得分:0)

    public async System.Threading.Tasks.Task mySendGridFunction(SendGridMessage message)
    {
        HttpClient client = new HttpClient();

        var requestContent = new FormUrlEncodedContent(new[]{
            new KeyValuePair<string, string>("api_user", "XXXXXXXXX"),
            new KeyValuePair<string, string>("api_key", "XXXXXXXX"),
            new KeyValuePair<string, string>("to", "shocklanced@gmail.com"),
            new KeyValuePair<string, string>("subject", "STEP-A Summary"),
            new KeyValuePair<string, string>("text", "Test Mail"),
            new KeyValuePair<string, string>("from", "davidrtye@gmail.com"),
            new KeyValuePair<string, string>("fromname", "STEP-A Automated Message"),
        });

        HttpResponseMessage response = await client.PostAsync("https://api.sendgrid.com/api/mail.send.xml", requestContent);

        HttpContent responseContent = response.Content; /*For Debugging purposes*/
    }