Skip to content

A telescope.nvim extension to find interactable elements on an iOS simulator and interact with them

License

Notifications You must be signed in to change notification settings

tomoakley/idb.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idb.nvim

I am attempting to write a Neovim plugin that can use idb, a tool to interact with iOS simulators (mainly for automated testing) in a scriptable manor. I want to be able to show a telescope.nvim search box with all the interactable elements on the iOS simulator screen, so I can avoid using the mouse when interacting with the simulator.

Install

Use your standard plugin manager (however there is very little here so far so not much point).

Dependencies

Setup

require("nvim-idb").setup()

Usage

:lua require('telescope').extensions["nvim-idb"].get_elements()

This will probably not work correctly! But if you want to try it then go ahead.nvim

:IDBStartSession - This is a very experimental mode to start an IDB "session". This will "take over" your vim session; it will remap various keys to manipulate the simulator:

  • j - scroll down on simulator
  • k - scroll up on simulator
  • f - show element picker in Telescope
  • t - tap on specifc point. Pass in x y with a space or a comma. E.g 650,2600, 650, 2600 or 650 2600 should all work
  • . - repeat last interacterable command (i.e something that produces a UI output on the screen)
  • H - swipe back on the simulator
  • r - restart app
  • <c-n> - when focussed on an input, press <c-n> to simulate pressing 'next' or 'submit' on the iOS keyboard. (Currently won't focus the next input in IDB, but will submit a form if it's the last element)
  • <esc> - Quit this mode and return mappings to vim

I think this could be pretty powerful. I have some ideas on other mappings or features (most of which already exist in vim!) I could add:

  • gg and G to scroll to top/bottom of content in the simulator
  • 10j - bigger motion events
  • - record and play macros (?!) - record a sequence of events in the Simulator and then play it back later (persisted across IDB sessions of course!)
  • / - search for item on screen and scroll to it

About

A telescope.nvim extension to find interactable elements on an iOS simulator and interact with them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 99.2%
  • Makefile 0.8%