Revision 702d2579
Added by Andreas Kohlbecker almost 13 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java | ||
---|---|---|
123 | 123 |
|
124 | 124 |
this.pageUrl = url; |
125 | 125 |
|
126 |
logger.info("loading " + pageUrl); |
|
127 |
|
|
126 | 128 |
// This call sets the WebElement fields. |
127 | 129 |
PageFactory.initElements(driver, this); |
128 | 130 |
|
129 |
logger.info("loading " + pageUrl); |
|
130 | 131 |
} |
131 | 132 |
|
132 | 133 |
/** |
... | ... | |
142 | 143 |
|
143 | 144 |
this.wait = new JUnitWebDriverWait(driver, 25); |
144 | 145 |
|
146 |
// preliminary set the pageUrl to the base path of this page, this is used in the next setp to check if the |
|
147 |
// driver.getCurrentUrl() is a sub path of the base path |
|
145 | 148 |
this.pageUrl = new URL(context.getBaseUri().toString() + DRUPAL_PAGE_QUERY_BASE + getDrupalPageBase()); |
146 | 149 |
|
147 | 150 |
if(!isOnPage()){ |
148 | 151 |
throw new Exception("Not on the expected portal page ( current: " + driver.getCurrentUrl() + ", expected: " + pageUrl + " )"); |
149 | 152 |
} |
150 | 153 |
|
154 |
// now set the real URL |
|
155 |
this.pageUrl = new URL(driver.getCurrentUrl()); |
|
156 |
|
|
157 |
logger.info("loading " + pageUrl); |
|
158 |
|
|
151 | 159 |
// This call sets the WebElement fields. |
152 | 160 |
PageFactory.initElements(driver, this); |
153 | 161 |
|
154 |
logger.info("loading " + pageUrl); |
|
155 | 162 |
} |
156 | 163 |
|
157 | 164 |
/** |
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesianaPolytomousKeyTest.java | ||
---|---|---|
9 | 9 |
*/ |
10 | 10 |
package eu.etaxonomy.dataportal.selenium.tests.flMalesiana; |
11 | 11 |
|
12 |
import java.net.MalformedURLException; |
|
13 | 12 |
import java.util.UUID; |
14 | 13 |
|
15 | 14 |
import org.junit.Assert; |
16 | 15 |
import org.junit.Test; |
17 |
import org.openqa.selenium.support.PageFactory; |
|
18 | 16 |
|
19 | 17 |
import eu.etaxonomy.dataportal.DataPortalContext; |
20 | 18 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
Also available in: Unified diff
fixing pageURL