Skip to content

[Feature Request] To use data in yaml file individually #20

@anilreddy

Description

@anilreddy

Hi @cheezy

Currently in the methods if we have please waits & conditions likes if, else etc. I am unable to use data magic.

Say if I have methods that have if else conditions like this:

I cannot use populate_page_with data_for instead it would be great if you can implement like this:

yaml file:

comment_details:
  test_comment: Test comment details
  report_comment: Report comment details
  def enter_comment_details(data = {})
    if report_comment.nil?
      if category == $category[:test].to_s
        if want_date_radio == $confirm[:yes].to_s
          select_want_date_radio
          wait_until_page_loads
          self.want_date = current_date
        elsif test_comment_radio == $confirm[:yes].to_s
          select_test_comment_radio
          wait_until_page_loads
          self.test_comment = test_comment # use here
        end
        self.report_comment = report_comment
      elsif category == $category[:report].to_s
        self.report_comment == report_comment # use here
    end
  end 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions