Skip to content
Snippets Groups Projects
Commit 9ae4408f authored by srosse's avatar srosse
Browse files

OO-4454: update selenium tests for catalog

parent 74f09d8b
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ public class CatalogAdminPage { ...@@ -64,7 +64,7 @@ public class CatalogAdminPage {
By saveBy = By.cssSelector(".o_sel_catalog_add_category_popup .o_sel_catalog_entry_form_buttons button.btn-primary"); By saveBy = By.cssSelector(".o_sel_catalog_add_category_popup .o_sel_catalog_entry_form_buttons button.btn-primary");
browser.findElement(saveBy).click(); browser.findElement(saveBy).click();
OOGraphene.waitBusy(browser); OOGraphene.waitBusy(browser);
By nodeTitleBy = By.xpath("//div[contains(@class,'o_meta')]//h4[contains(@class,'o_title')][contains(text(),'" + shortTitle + "')]"); By nodeTitleBy = By.xpath("//div[contains(@class,'o_meta')]//h4[contains(@class,'o_title')]/a/span[contains(text(),'" + shortTitle + "')]");
OOGraphene.waitElement(nodeTitleBy, browser); OOGraphene.waitElement(nodeTitleBy, browser);
return this; return this;
} }
...@@ -76,7 +76,7 @@ public class CatalogAdminPage { ...@@ -76,7 +76,7 @@ public class CatalogAdminPage {
* @return * @return
*/ */
public CatalogAdminPage selectNode(String shortTitle) { public CatalogAdminPage selectNode(String shortTitle) {
By titleBy = By.xpath("//div[contains(@class,'o_sublevel')][div[contains(@class,'o_meta')]//h4[contains(@class,'o_title')][text()[contains(.,'" + shortTitle + "')]]]/div/a"); By titleBy = By.xpath("//div[contains(@class,'o_sublevel')]/div[contains(@class,'o_meta')]/h4[contains(@class,'o_title')]/a[span[text()[contains(.,'" + shortTitle + "')]]]");
OOGraphene.waitElement(titleBy, browser); OOGraphene.waitElement(titleBy, browser);
browser.findElements(titleBy).get(0).click(); browser.findElements(titleBy).get(0).click();
OOGraphene.waitBusy(browser); OOGraphene.waitBusy(browser);
......
...@@ -43,7 +43,7 @@ public class CatalogPage { ...@@ -43,7 +43,7 @@ public class CatalogPage {
} }
public CatalogPage selectCatalogEntry(String title, String shortTitle) { public CatalogPage selectCatalogEntry(String title, String shortTitle) {
By titleBy = By.xpath("//div[contains(@class,'o_sublevel')][div/h4[contains(@class,'o_title')][text()[contains(.,'" + shortTitle + "')]]]/div/a"); By titleBy = By.xpath("//div[contains(@class,'o_sublevel')]/div/h4[contains(@class,'o_title')]/a[span[text()[contains(.,'" + shortTitle + "')]]]");
List<WebElement> titleLinks = browser.findElements(titleBy); List<WebElement> titleLinks = browser.findElements(titleBy);
Assert.assertFalse(titleLinks.isEmpty()); Assert.assertFalse(titleLinks.isEmpty());
titleLinks.get(0).click(); titleLinks.get(0).click();
......
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