• Home

  • Courses

    • Run Java Selenium Tests in Azure Devops
    • Interviewing for Testing Positions
  • For Business

  • Trainings

    • Beginner Selenium (May 2018)
    • Advanced Selenium (Feb 2019)
  • Teacher

  • Bootcamp Info

  • Forum

  • Blog

  • Meetups

    • Test Automation for Responsive Site
    • All about Locators in Selenium Projects
  • More..

    • FAQ
    • Cheat Sheets
    • Presentations
  • More...

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    bogelena5
    May 22, 2018

    Why searchFor(searchKeyword); method does not work

    in Selenium Questions

    HomeworkTests_NoMethods.java contains three unit tests:

    broadenSearchShowsMoreResults()

    bookInfoIsCorrectOnDetailsPage()

    paginationWorksInDetailsPage()

    and all of them have the same step "search for keyword".

    //searchFor(searchKeyword);

    WebElement searchBox = wait.until(ExpectedConditions.

    visibilityOfElementLocated(searchBoxId));

    searchBox.sendKeys(searchKeyword);


    WebElement searchButton = wait.until(ExpectedConditions.

    visibilityOfElementLocated(searchButtonId));

    searchButton.click();

    But for some reason only first broadenSearchShowsMoreResults() works, but other two failed on that step in spite of code is exactly the same:

    Error message in trace:

    org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1583, 230)



    6 comments
    0
    6 Comments

    Share Your ThoughtsSign up to leave a comment.

    O
    Oleg K
    May 23, 2018

    Yes, it seems the details pages no longer have pagination elements. Maybe it is a bug on their side and they will be back ... who knows :(

    Like

    alexsiminiuc3
    May 23, 2018

    I dont see those links either.

    Maybe they are not in the page any longer.

    Like

    bogelena5
    May 23, 2018



    Like

    bogelena5
    May 23, 2018

    I got this error when running unit test bookInfoIsCorrectOnDetailsPage:

    org.openqa.selenium.TimeoutException: Expected condition failed: waiting for visibility of element located by By.xpath: //a[@testid = 'link_next'] (tried for 15 second(s) with 500 milliseconds interval)

    BUT

    I cannot see Next and Previous buttons on Detail Page at all. These buttons are visible only on Results page . Please see the attached screen shots below


    Like

    bogelena5
    May 23, 2018

    Actually, the key word java is inserted and after that the test fails, so the line where error happens is this:

    WebElement searchButton = wait.until(ExpectedConditions.

    visibilityOfElementLocated(searchButtonId));

    searchButton.click();


    I cannot get it: why exactly same code works for one Unit test and does not work for another?



    Like

    alexsiminiuc3
    May 22, 2018

    can you paste the line where the error happens?

    Like
    6 comments

    © 2021 Vancouver Selenium WebDriver Automation Training