How do you identify iOS Safari web element IDs in Appium Inspector

1,917 views
Skip to first unread message

Dean Crilly

unread,
May 15, 2013, 7:59:45 AM5/15/13
to appium-...@googlegroups.com
Pretty new to Appium, I am attempting to automate some Safari iOS tests on the emulator using Selenium. However I am struggling to identify the web elements on Safari iOS. Steps that I am using:

1. Open latest version of the Appium.app
2. Select the 'Use Mobile Safari' check box, (all other options kept to default, using localhost).
3. Select 'Launch' (info: Appium REST http interface listener started on 0.0.0.0:4723)
4. Select the 'i' button to launch the 'Inspector'.

At this point the Appium Inspector and iOS simulator seem to start ok, when looking at logs they seem ok.

So my question: How do you identify the Web Element IDs on iOS Safari Browser?

I was expecting that when using the Safari browser (i.e. Searching using browser, selecting links in results), the corresponding events would be displayed in the inspector. I tried with record on and and off, but no events are displayed.

Am I using this tool correctly? If not what is the correct way to view events?

Have attached logs.

Thanks!


Appium_Inspector_Output1.rtf

Dean Crilly

unread,
May 15, 2013, 8:38:48 AM5/15/13
to appium-...@googlegroups.com
In addition to my original posting, what I am trying to acheive is a record/ play back (similar to Selenium IDE), when I can record the event in the iOS Safari browser, then have the ability to export these as Java.

Jonathan Lipps

unread,
May 16, 2013, 1:53:51 PM5/16/13
to Dean Crilly, appium-...@googlegroups.com
I don't think Appium Inspector works with hybrid mode yet. Dan?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dan Cuellar

unread,
May 16, 2013, 2:49:36 PM5/16/13
to appium-...@googlegroups.com
It does not work with items on web views yet.

Veronica Bacun

unread,
Jul 4, 2013, 9:45:23 AM7/4/13
to appium-...@googlegroups.com
Hello Dan,

Could you please say does Appium Inspector work now with hybrid mode? or when does it possible work in this mode?

Dan Cuellar

unread,
Jul 4, 2013, 4:27:09 PM7/4/13
to appium-...@googlegroups.com
In preferences turn on Developer Mode and try it out. A box will appear in the lower right hand part of inspector that will switch to the hybrid view.

Veronica Bacun

unread,
Jul 8, 2013, 3:02:39 AM7/8/13
to appium-...@googlegroups.com
Thanks Dan! Now I see this window and I inspected needed elements.

fayre...@gmail.com

unread,
Aug 22, 2013, 4:18:42 AM8/22/13
to appium-...@googlegroups.com
Hi All,

I too would benefit from the inspector working on web / hybrid apps. I tried Dan's suggestion above - in "Developer Settings" I set Enabled=ON but left the other 3 options off (Use External Node JS Binary, Use External Appium package, and NodeJS Debug Port). However, no box to switch to hybrid view appeared in the Inspector. Perhaps this was present in an earlier build but removed for some reason?

Has anyone tried testing hybrid apps using Appium to record the test for the Native "bits", and Selenium IDE with the appropriate page loaded into Firefox to record the Web based bits, and then "glue them together"? How did you get on?!


Also - does anyone know anything of when the inspector might offer better support for landscape apps rather than just portrait?

Cheers


Steve

Dan Cuellar

unread,
Aug 22, 2013, 10:52:40 AM8/22/13
to appium-...@googlegroups.com
Appium 0.8.3 fixed a lot of the landscape issues, but there are some underlying ones in the server layer that need to be fixed. If you can get good repros please log bugs. The problem is that the orientation returned by UIAutomation is not always the same as what the iOS simulator displays as. (e.g. if your app is landscape only, it will tell you the sim is in portrait even though you are viewing it as landscape) I added a rotate button the the 0.8.5 that will let you rotate to help match it up better, but it's not 100% perfect either.

As for implenting webview support for inspector. It's a very very large task. I went into the details in another post. If you use the window selector in the lower-right hand corner you can get some insight, but writing a full blown HTML dom parser with support for finding elements on the screen is a large task

fayre...@gmail.com

unread,
Aug 27, 2013, 7:28:31 AM8/27/13
to appium-...@googlegroups.com
Thanks Dan... Is the whole Landscape/Portrait issue an ongoing investigation?

Cheers!

Dan Cuellar

unread,
Aug 27, 2013, 10:34:36 AM8/27/13
to appium-...@googlegroups.com
There are tickets on it. There are both bugs around this in UIAutomation, appium server, and the GUI. It's a mess
Reply all
Reply to author
Forward
0 new messages