Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ee5e4869 authored by comanca's avatar comanca
Browse files

Fixed Domain Grid to take into account column name instead of column index

parent a663af5e
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.smp</groupId>
<artifactId>SMPUIAutomation</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>com.test.smp</groupId>
<artifactId>SMPUIAutomation</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<url>http://localhost:8080/smp</url>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<url>http://localhost:57005/smp</url>
<gecko.driver.path>drivers/geckodriver.exe</gecko.driver.path>
<chrome.driver.path>drivers/chromedriver.exe</chrome.driver.path>
</properties>
</properties>
<dependencies>
<dependency>
......@@ -77,7 +77,7 @@
<failIfNoTests>true</failIfNoTests>
<systemPropertyVariables>
<webdriver.chrome.driver>${chrome.driver.path}</webdriver.chrome.driver>
<webdriver.gecko.driver>${gecko.driver.path}</webdriver.gecko.driver>
<webdriver.gecko.driver>geckodriver.exe</webdriver.gecko.driver>
<reports.folder>./target/</reports.folder>
<data.folder>.\src\main\resources\</data.folder>
<testdata.file>testData.json</testdata.file>
......@@ -85,6 +85,12 @@
<SHORT_TIMEOUT>5</SHORT_TIMEOUT>
<UI_BASE_URL>${url}/ui/</UI_BASE_URL>
</systemPropertyVariables>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>true</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
......@@ -112,6 +118,12 @@
<SHORT_TIMEOUT>15</SHORT_TIMEOUT>
<UI_BASE_URL>${url}/ui/</UI_BASE_URL>
</systemPropertyVariables>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>true</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
......
......@@ -12,28 +12,40 @@ public class DomainGrid extends BasicGrid {
public DomainGrid(WebDriver driver, WebElement container) {
super(driver, container);
}
private By cellSelector = By.tagName("datatable-body-cell");
public List<DomainRow> getRowsInfo(){
List<DomainRow> rowInfos = new ArrayList<>();
for (WebElement gridRow : gridRows) {
List<WebElement> cells = gridRow.findElements(cellSelector);
DomainRow row = new DomainRow();
row.setDomainCode(cells.get(0).getText().trim());
row.setSmlDomain(cells.get(1).getText().trim());
row.setSmlSmpID(cells.get(2).getText().trim());
row.setClientCertHeader(cells.get(3).getText().trim());
row.setClientCertAlias(cells.get(4).getText().trim());
row.setClientCertAlias(cells.get(5).getText().trim());
row.setSignatureCertAlias(cells.get(6).getText().trim());
for (int i = 0; i < headerTxt.size(); i++) {
switch (headerTxt.get(i)){
case "Domain code":
row.setDomainCode(cells.get(i).getText().trim());
break;
case "SML Domain":
row.setSmlDomain(cells.get(i).getText().trim());
break;
case "Signature CertAlias":
row.setSignatureCertAlias(cells.get(i).getText().trim());
break;
case "SML SMP Id":
row.setSmlSmpID(cells.get(i).getText().trim());
break;
}
}
rowInfos.add(row);
}
return rowInfos;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment