如何根据通过功能文件传递的数据更新xpath

时间:2019-01-21 15:14:18

标签: protractor cucumber

我有一个需要点击日期的场景。需要从功能文件发送日期。 xpath如下。

1

功能文件如下

//table[@class="mat-calendar-table"]/tbody/tr/td[@aria-label="January 1, 2019"].  

请让我知道如何将日期从功能文件传递到xpath

1 个答案:

答案 0 :(得分:0)

Application.yml

 mail:
    host: smtp.gmail.com
    port: 587
    username: 
    password: 
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true  

MailService:

public class EmailServiceImpl implements EmailService {

    @Autowired
    private JavaMailSender mailSender;

    /**
     * Send email.
     *
     * @param to the to
     * @param subject the subject
     * @param text the text
     */
    @Override
    public void sendEmail(String to, String subject, String text) {

        try {
            SimpleMailMessage message = new SimpleMailMessage();
            message.setTo(to);
            message.setSubject(subject);
            message.setText(text);

            mailSender.send(message);
        } catch (MailException e) {
            log.info("Mail Exception {}", e);
        }


    }