I need to select a frame but it has no name or id. How do it do it?
<frame src="sampleSrouce" scrolling="yes" frameborder="0" />
<frame src="sampleSource2" scrolling="yes" frameborder="0" />
Thanks!
So basically, I found out that the solution is quite simple. I just used an xpath that points to the second frame:
xpath=/html/frameset/frame[2]
We can get the xpath count, and then get the attribute value of src.
If we get the desired src value we can pick the counter value and create an xpath with index.
Then we can use Select frame with the xpath to select the value.
${count}= Get Matching Xpath Count .//div[@dir]/iframe
:FOR ${i} IN RANGE 1 ${count}+1
\ ${myText}= Selenium2Library.Get Element Attribute xpath=//iframe[${i}]@src
Exit For Loop
Select Frame xpath=//iframe[2]
Selenium2Library.Input Text id=text1 test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With