Search in sources :

Example 1 with SearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject in project selenium-tests by Wikia.

the class Searching method serachGlobalNavigationBarAsLoggedIn.

@Test(groups = { "serachGlobalNavigationBarAsLoggedIn" }, dataProvider = "getDataForGlobalSearch")
@Execute(asUser = User.USER)
public void serachGlobalNavigationBarAsLoggedIn(String wikiName, String query, String expectedSpecialPage) {
    HomePage homePage = new HomePage();
    homePage.getUrl(urlBuilder.getUrlForWiki(wikiName));
    SearchPageObject search = homePage.getGlobalNavigation().search(query);
    Assertion.assertStringContains(driver.getCurrentUrl(), expectedSpecialPage);
    Assertion.assertTrue(search.isResultPresent());
}
Also used : HomePage(com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage) SearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test)

Example 2 with SearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject in project selenium-tests by Wikia.

the class Searching method serachGlobalNavigationBarAsAnon.

@Test(groups = { "serachGlobalNavigationBarAsAnon" }, dataProvider = "getDataForGlobalSearch")
public void serachGlobalNavigationBarAsAnon(String wikiName, String query, String expectedSpecialPage) {
    HomePage homePage = new HomePage();
    homePage.getUrl(urlBuilder.getUrlForWiki(wikiName));
    SearchPageObject search = homePage.getGlobalNavigation().search(query);
    Assertion.assertStringContains(driver.getCurrentUrl(), expectedSpecialPage);
    Assertion.assertTrue(search.isResultPresent());
}
Also used : HomePage(com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage) SearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject) Test(org.testng.annotations.Test)

Example 3 with SearchPageObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject in project selenium-tests by Wikia.

the class BasicActions method namespaces.

@Test(dataProviderClass = IntraWikiSearchProvider.class, dataProvider = "getNamespaces", groups = { "IntraWikiSearch_013", "Search", "Search1" })
@RelatedIssue(issueID = "MAIN-7142", comment = "Product code defect. No need to test manually")
public void namespaces(String searchPhrase, String namespace) {
    IntraWikiSearchPageObject search = new IntraWikiSearchPageObject(driver);
    search.openWikiPage(testedWiki);
    search.searchFor(searchPhrase);
    search.selectAllAdvancedOptions();
    SearchPageObject searchPage = new SearchPageObject(driver);
    searchPage.clickSearchButton();
    searchPage.setSearchTab(SearchPageObject.SearchTab.EVERYTHING);
    search.verifyNamespace(namespace);
}
Also used : IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) SearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject) IntraWikiSearchPageObject(com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue)

Aggregations

SearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.SearchPageObject)3 Test (org.testng.annotations.Test)3 HomePage (com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage)2 Execute (com.wikia.webdriver.common.core.annotations.Execute)1 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 IntraWikiSearchPageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.search.intrawikisearch.IntraWikiSearchPageObject)1