Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function waitAndClick(locator, time) {
- return driver.wait( until.elementLocated( locator ), time = 20000)
- .then(element => element.click())
- }
- function waitAndSendKeys(locator, value) {
- return driver.wait( until.elementLocated( locator ),time = 20000)
- .then(el => el.sendKeys(value));
- }
- waitAndClick( By.xpath( '//li/a[@href = "/newOrder/index" ]' ) )
- .then(waitAndClick( By.id( 'SenderSelectButton' ) ))
- .then(waitAndClick( By.xpath( '//div[@id = "filter_journal_cities_div"][1]//div/i[@class = "icon-remove"]' ) ))
- .then(waitAndSendKeys( By.id( 'filter_journal_cities' ) , 'Полтава' ))
- .then(driver.wait(until.elementLocated(By.xpath( '//li[@class = "browser_element_main active"]/a[1][ contains(text( ), "Полтава") ]' ))))
- .then(waitAndClick( By.id( 'filter_journal_address' ) ))
- .then(waitAndClick( By.id( 'address_ul' ) ))
- .then(driver.sleep(1500))
- .then(waitAndSendKeys( By.id( 'filter_journal_address' ), 'Ковпака' ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement