{"action":"closed","issue":{"url":"https://api.github.com/repos/paul-hammant/ngWebDriver/issues/55","repository_url":"https://api.github.com/repos/paul-hammant/ngWebDriver","labels_url":"https://api.github.com/repos/paul-hammant/ngWebDriver/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/paul-hammant/ngWebDriver/issues/55/comments","events_url":"https://api.github.com/repos/paul-hammant/ngWebDriver/issues/55/events","html_url":"https://github.com/paul-hammant/ngWebDriver/issues/55","id":298866521,"number":55,"title":"waitForAngularRequestToFInish() does help and webdriver is ahead of angular request.","user":{"login":"amitpokhrel","id":3794491,"avatar_url":"https://avatars1.githubusercontent.com/u/3794491?v=4","gravatar_id":"","url":"https://api.github.com/users/amitpokhrel","html_url":"https://github.com/amitpokhrel","followers_url":"https://api.github.com/users/amitpokhrel/followers","following_url":"https://api.github.com/users/amitpokhrel/following{/other_user}","gists_url":"https://api.github.com/users/amitpokhrel/gists{/gist_id}","starred_url":"https://api.github.com/users/amitpokhrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitpokhrel/subscriptions","organizations_url":"https://api.github.com/users/amitpokhrel/orgs","repos_url":"https://api.github.com/users/amitpokhrel/repos","events_url":"https://api.github.com/users/amitpokhrel/events{/privacy}","received_events_url":"https://api.github.com/users/amitpokhrel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-21T07:29:55Z","updated_at":"2018-03-01T08:25:38Z","closed_at":"2018-03-01T08:25:38Z","author_association":"NONE","body":"I am trying to write a simple test in webdriver for angular site. Beow is my code:\r\n`@Test\r\n    public void testapp() {\r\n\r\n        System.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/drivers/chromedriver.exe\");\r\n\r\n        ChromeDriver driver = new ChromeDriver();\r\n        driver.get(\"http://nvscmlind2:8080/indv301\");\r\n        new NgWebDriver(driver).waitForAngularRequestsToFinish();\r\n\r\n        WebElements webElements = new WebElements(driver);\r\n        webElements.filterIcon.click();\r\n        new NgWebDriver(driver).waitForAngularRequestsToFinish();\r\n\r\n        SeleniumUtils.selectByVisibleText(webElements.columnSelect, \"Age\");\r\n        SeleniumUtils.selectByValue(webElements.filterSelect, \">\");\r\n        SeleniumUtils.sendKeysToInput(\"10\", webElements.filterValue);\r\n        webElements.applyButton.click();\r\n\r\n    }`\r\n`private static class WebElements {\r\n        public WebElements(WebDriver driver) {\r\n            PageFactory.initElements(driver, this);\r\n        }\r\n\r\n        @FindBy(xpath = \"//app-data-grid\")\r\n        private WebElement dataGrid;\r\n\r\n        @FindBy(xpath = \"//app-customization//i[@class='ic-gear']\")\r\n        private WebElement gearIcon;\r\n\r\n        @FindBy(className = \"close-modal\")\r\n        private WebElement closeModal;\r\n\r\n        @FindBy(className = \"ic-filter\")\r\n        private WebElement filterIcon;\r\n\r\n        @FindBy(xpath = \"//app-modal-content//select[@formcontrolname='name']\")\r\n        private WebElement columnSelect;\r\n\r\n        @FindBy(xpath = \"//app-modal-content//select[@formcontrolname='op']\")\r\n        private WebElement filterSelect;\r\n\r\n        @FindBy(xpath = \"//app-modal-content//input\")\r\n        WebElement filterValue;\r\n\r\n        @FindBy(xpath = \"//app-modal-content//button[text()='Apply']\")\r\n        WebElement applyButton;\r\n    }`\r\nwhen I execute the code I get below error:\r\n`org.openqa.selenium.NoSuchElementException: Cannot locate element with text: Age`\r\n\r\nNow when I implement the same test in protractor it works fine everytime.\r\n`describe('Protractor Demo App', function() {\r\n  it('should have a title', function() {\r\n    browser.get('http://nvscmlind2:8080/indv301');\r\n\telement(by.css('.ic-filter')).click();\r\n\telement(by.xpath('//app-modal-content//select[@formcontrolname=\"name\"]')).element(by.cssContainingText('option', 'Age')).click();\r\n\telement(by.xpath('//app-modal-content//select[@formcontrolname=\"op\"]')).element(by.cssContainingText('option', 'Greater than')).click();\r\n\telement(by.xpath('//app-modal-content//input')).sendKeys('10');\r\n\telement(by.xpath('//app-modal-content//button[text()=\"Apply\"]')).click();\r\n\t//browser.driver.sleep(20000);\r\n  });\r\n});`\r\n\r\nWhy does it not work?"}}
{"actor":{"display_login":"paul-hammant"}}