question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Func test] Fix ios keyboard_tests

See original GitHub issue

The problem

Failing ios keyboard_tests at functional tests.

https://dev.azure.com/AppiumCI/Appium CI/_build?definitionId=56&_a=summary&view=runs

Environment

See

Details

  • hide_keyboard works well with Ad v1.19.1 and current functional test codes.
  • hide_keyboard doesn’t work well with appium CLI v1.20.0-beta.0 and current functional test codes.
  • When the element gone from current view, below code throws Exception.
        el = self.driver.find_element_by_class_name('UIAKeyboard')
        assert el.is_displayed()

        self.driver.hide_keyboard(key_name='Done')

        assert not el.is_displayed()  # Exception occurs

Link to Appium Logs

https://dev.azure.com/AppiumCI/Appium CI/_build?definitionId=56&_a=summary&view=runs

Code To reproduce issue

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mykola-mokhnachcommented, Jan 25, 2021

@ki4070ma I did some local testing and managed to make WDA working properly there: https://github.com/appium/WebDriverAgent/pull/460

Also, the things, that should be changed in the python test itself (and probably other tests from this group):

    def test_hide_keyboard(self) -> None:
        self._move_to_textbox()
       
        
        el = self.driver.find_elements_by_class_name('XCUIElementTypeTextField')[0]
        el.click()
        el.set_value('Testing')

        # The locator should be updated to 'XCUIElementTypeKeyboard'
        el = self.driver.find_element_by_class_name('UIAKeyboard')
        assert el.is_displayed()

        self.driver.hide_keyboard(key_name='Done')

        # Here we don't need nothing, because `hide_keyboard` call throws an exception on its own if the keyboard is still visible
        assert not el.is_displayed()
1reaction
mykola-mokhnachcommented, Jan 24, 2021

This is totally fine that tests are executed on beta, since sooner or later these changes will pop up in the next release. It is important to know about possible issues in advance. Thus I appreciate any reports related to the beta version functionality

Read more comments on GitHub >

github_iconTop Results From Across the Web

UI test fails due to "speed up your typing" tutorial
Sometimes when running UI tests, the tests fail on keyboard input because the "Speed up your typing" keyboard tutorial overlay obscures the keys....
Read more >
How to hide keyboard in Swift app during UI testing
1. If you can't access a button when the keyboard is visible, isn't that a UX problem ? 2. These are just tests....
Read more >
iOS Unit Testing and UI Testing Tutorial - RayWenderlich.com
But first, fix the previous test by undoing the change you made to url . Then, add the following test to your class:...
Read more >
KIF iOS Integration Testing Framework - GitHub
KIF, which stands for Keep It Functional, is an iOS integration test framework. It allows for easy automation of iOS apps by leveraging...
Read more >
Pulmonary Function Tests | Johns Hopkins Medicine
Pulmonary function tests (PFTs) are noninvasive tests that show how well the lungs are working. The tests measure lung volume, capacity, rates of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found