I am automating a SAP web application. As i log into it there is an iframe which i am successfully able to switch and add credentials and move on. After few actions , I reach another page, while i am able to identify the element in the dom, Robotframe is not able to identify it.
When i searched through the dom I see that the element is under a Iframe and then followed by multiple Tables and Tds. I try switching to that Iframe but I get an error saying not able to find that locator.
Can someone please advise how i take it forward. Any help or suggestion is highly appreciated.
It depends on the library that you use. Which one are you using for accessing the web application? Like Selenium library or Browser library or something SAP specific.
there is an iframe which i am successfully able to switch
Purely based on this I’ll guess you are using SeleniumLibrary?
Possably what you need to do is Unselect Frame before trying to select the new frame, as I suspect it’s not finding the new frame within the old frame?
If you are not using SeleniumLibrary, you’ll need to find the equivalent keyword fro the library you’re using.
I tried unselecting the previous iframe and then selecting this but then i got error overall . Let me retry once more and see if that will help . But thank you so much for the option you shared.
Unselect Frame resets you back to the top level so you might have to Unselect Frame then select parent frame, then select sub frame and even repeat if it’s a frame soup, which it can be depending which SAP web technology your server is using.
Yes several o the SAP web technologies are famous for mixing frames and i frames and nesting them hence “frame soup”.
Unfortunately Unselect Frame doesn’t have a way to specify how many frame levels you unselect it just goes back to top, so if you went iframe1 > iframeA > iframe_A1 and want to get to get to iframe_A2 also under iframeA, you need to first Unselect Frame, then Select Frame iframe1, Select Frame iframeA, and finally Select Frame iframeA2
The way Browser Library handles frames with it’s >>> syntax and Set Selector Prefix is much nicer, so depending on how deep you are into your script development and your requirements it may or may not be worth considering the switch.
First of all i am really overwhelmed with the response i am hearing from the community. I had used Robotframe sometime back, but not so extensively as now, but i really appreciate the response and suggestion from the community which is really helping me.
Dave as you suggested , looks like the element is within a frame and way under multiple tables and tr.
That said I identified that , when I started off with automation for this SAP web application, I found there was this parent iframe which was detected, then another iframe when i trying to click the side bar.Both worked fine and helped click on elements.
Third was to generate a report, and then click on an element to export it. It is here that the export button is not being able to be clicked.I can find the element in the dom but unfortunately not able to click.
When I went up all the way I found one more Iframe, but this is where I have an issue. Its say element not identified.
As you all mentioned tried unselecting the iframe , by the keyword unselect frame, but will it suffice for two iframe one after the another.