We're here to help

HTML table and columns mapping

For HTML table and columns mapping, right click on a table field for mapping and choose Add to Test.

  1. It will create a new page object as it’s not a standard Salesforce object.
  2. It will create a new table name value.
  3. It will create an XPath field locator.
  4. It will map object field name value

Add a variable at the beginning.

Use the product in the Where Clause.

 

Table and column mapping

While mapping a table/columns which are not a standard Salesforce page, Provar will create a page object under Main folder (Project folder)>>src>>pageobjects.

Table mapping: This will locate the repeating rows of the table, it usually ends with tr.

@FindBy(xpath = "//*[@id=\"editPage\"]/table/tbody/tr[@valign='top']")
@PageTable(firstRowContainsHeaders = false, row = MultiLine.class)
public List<MultiLine> MultiLine;

 

Column mapping in rows: This is relative to the table mapping.

@PageRow()
Public static class MultiLine {

  @TextType()
  @FindBy(xpath = "th")
  public WebElement product;
  
  @TextType()
  @FindBy(Xpath = "td[1]/input"
  public WebElement quantity;

  @TextType()
  @FindBy(xpath = "td[2]/input")
  public WebElement salesPrice;

  @DateType
  @FindBy(xpath = "td[3]/span/input")
  public WebElement date;

  @TextType()
  @FindBy(xpath = "td[4]/input")
  public WebElement description;

}