Hello,
This is my biggest probleme with Appium/Selenium right now, I hope somebody will help me with that:
I’m trying to click on a Play Button on a Iframe on mobile webpage
On Android (with Chrome) it’s ok but on Iphone (with Safari) I have an error:
‘undefined’ is not an object (evaluating ‘a.nodeType’) (Selenium::WebDriver::Error::UnknownError)
This is the element :
in_iframe(id: “Iframe0”) do |frame|
link(:flow_launch_screen_link) { div_element(class: ‘LaunchScreen’, frame: frame).link_element(class: ‘playButton’) }
I can find it because a simple “puts self.flow_launch_screen_link_element.to_s” gives me : #PageObject::Elements::Link:0x007f9c3b3f98d0
And I check the source of the page in Chrome and Safaro and it’s exactly the same.
So I don’t get why I can’t make this click on IOS and I can in Android.
I found that an issue maybe related is open here :
opened 09:03AM - 06 Mar 14 UTC
closed 06:31PM - 24 Mar 14 UTC
Bug
Mobile Safari
Hi,
(Issue ported from https://groups.google.com/forum/#!topic/appium-discuss/v… IbhO_KljXc.)
I have starting using appium for testing of our mobile web app. Unfortunately it runs in an cross-origin iframe and Appium appears to have difficult accessing web elements in the iframe. I have setup a simple test page which contains a local iframe (same domain as parent) and a cross-origin iframe. Appium has no issue with accessing the local iframe content but fails when attempting to access elements within cross-origin iframe. Is this a known issue or does it sound like a bug. My WebDriver tests appear to work using chromedriver. I am new to Appium and was drawing to it as I would not need to change our internal testing framework which is Java/WebDriver based. I am stuck with this issues as our mobile app runs within Salesforce's environment so have no control over the use of iframes.
I see that switching to the cross-origin iframe seems to work, from the logs:
info: Entering new web frame: :wdc:1394013932388
info: Responding to client with success: {"status":0,"value":{"WINDOW":":wdc:1394013932388"},"sessionId":"539b787f-efa1-4060-b3fb-511549e5be1f"}
But when I attempt to access an element in the iframe I get the error "undefined' is not an object ", see below:
debug: Appium request initiated at /wd/hub/session/539b787f-efa1-4060-b3fb-511549e5be1f/element
debug: Request received with params: {"using":"xpath","value":"//table[@class='snowrep']"}
info: [REMOTE] Wrapping script for frame :wdc:1394013932388
info: [REMOTE] Sending javascript command
debug: [REMOTE] Sending _rpc_forwardSocketData: message to remote debugger
debug: [REMOTE] Receiving data from remote debugger
debug: [REMOTE] Receiving data from remote debugger
debug: [REMOTE] <applicationSentData response>
info: Responding to client with error: {"status":13,"value":{"message":"'undefined' is not an object (evaluating 'a.nodeType')","origValue":"'undefined' is not an object (evaluating 'a.nodeType')"},"sessionId":"539b787f-efa1-4060-b3fb-511549e5be1f"}
Regards,
Kieran
Is this the problem than me ? Has somebody a workaround ?
Thanks a lot
Hello,
Nobody know something about this ?
Facing similar kind of issue “undefined is not an object (evaluating ‘a.nodeType’) (status: 13)”
When getting text of an element after switching to iFrame
On Mobile Safari simulator
Does anybody got the solution to this issue?? Please help am completely stuck on iOS Mobile browser.
Unable to play video after switching to iframe. We are using Sauce Labs for testing on Mobile platform.