More test fixes

Fix failing tests
    - Some tests failing for objects not in focus
    - Timing issues
    - Some logic broke with last defocus change
    - update test after element id change
    - delete test case where input field is restricted with maxlength

Remove unused imports