As of now I am working on automation of iframes using Robot framework but I am not able to input text.

Current Frame Contains  xpath=//iframe[contains(@id,'sq-card-number')]  NONE

#Frame Should Contain   xpath=//iframe[contains(@id,'sq-card-number')]  Card Number

Wait Until Element Is Visible   xpath=//iframe[contains(@id,'sq-card-number')]  30sec

Input Text  xpath=//*[contains(@id,'sq-card-number')]   12345

The above is the code I used

  • 2
    where is your HTML? And what is the error you are getting? (this includes you do not get anything)
    – Yu Zhang
    Jul 26, 2018 at 6:57

2 Answers 2


I think you need select the iframe first with the Select Frame seleniumlibrary keyword.


Select Frame      top-frame   # Select frame with id or name 'top-frame'
Click Link        example     # Click link 'example' in the selected frame
Unselect Frame        # Back to main frame.
Select Frame      //iframe[@name='xxx']   # Select frame using xpath

Try using driver.switchTo.frame("frameid"); and then try to use input text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.