-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interacting with 3rd layer of frames - workaround accessing subframe URL directly #1129
Comments
Hi @GitarooDan I don't think it works beyond 2 layers of iframes. CC @kensoh to look into this when he is available. |
Thanks for getting back to me - the website is an internal one I'm afraid so I can't share it but I have since writing this started getting the URL of the first frame, appending it to the main page URL, opening that as a separate page and then interacting with the further 2 frames from there. read //iframe[@id='iframeMain']/@src to frameurl It's working, if a little inelegant. I'd still be interested in why my initial solution didn't seem to work! |
Adding on, hi @GitarooDan, your initial solution does not work because other than changing tagui_parse.php, there is also a need to change the chrome.withFrame function in tagui_header.js. TagUI is designed and tested to only work with 2 layers of frames, thus inside the chrome.withFrame function in tagui_header.js the code and logic only handles a main frame and sub frame context. And there isn't code there to cater for a 3rd parameter for a further sub frame. Your working solution is great, by accessing the initial frame directly, you have gotten around this current TagUI limitation. PS - sorry for my slow reply, was away past few weeks to organise my mum's funeral and coming back to work again |
No worries @kensoh - I'm sorry to hear that, it must be an incredibly difficult time for you. I hope you're doing alright and thank you for taking the time to get back to me. |
Thank you for sharing my pain @GitarooDan, I appreciate it 🙏🏻 I'll have to hurriedly return to my duties as breadwinner and also supporting baby care, though I would wish for more time for grieving and more quiet moments to remember my mum. |
Hi there,
I found an old discussion which referenced by query here and the answer was that tagui was not (at that time) setup to work with 3 layers of frames. From my testing, this seems to be where my automation is falling over. Is there any way around this? I have tried to fiddle the tagui_parse.php file and it now accepts "frame | frame | frame" and translates to...
casper.then(function() {techo('frame a | b | c');});
chrome.withFrame('a', function() {chrome.withFrame('b', function() {chrome.withFrame('c', function() {
{ // start of code block
// code removed
} // end of code block
});});});
However it can't seem to find elements within the 3rd layer of frame like this.
The text was updated successfully, but these errors were encountered: