This worked for me:
1.9.3p0 :010 > @browser = Watir::Browser.new :ff
=> #<Watir::Browser:0x1a3c9129f0bc263a
url="about:blank" title="">
1.9.3p0 :011 > @browser.goto "
https://www.salesforce.com/form/signup/freetrial-lb.jsp?d=70130000000EeY0&display_type=lb&contentWidth=790&contentPadding=30
"
=> "
https://www.salesforce.com/form/signup/freetrial-lb.jsp?d=70130000000EeY0&display_type=lb&contentWidth=790&contentPadding=30
"
1.9.3p0 :012 > @browser.text_field(:id, 'UserFirstName').set "hello"
=> ""
1.9.3p0 :013 >
On Fri, Mar 15, 2013 at 10:11 AM, <[email protected]> wrote:
> This is the html code.
>
> <div id="fancybox-content" style="border-width: 10px; width: 850px;
> height: 640px;">
> <iframe id="fancybox-frame" scrolling="no" frameborder="0" src="
> https://www.salesforce.com/form/signup/freetrial-lb.jsp?d=70130000000EeY0&display_type=lb&contentWidth=790&contentPadding=30"
> hspace="0" name="fancybox-frame1363356456458">
> <!DOCTYPE html>
> <html class="desktop js canvas canvastext geolocation postmessage
> hashchange history cssanimations csstransitions video audio localstorage
> sessionstorage applicationcache svg inlinesvg smil cookies json
> mediaqueries devicemotion deviceorientation placeholder formvalidation
> framed" lang="en" itemtype="http://schema.org/" itemscope="" xmlns:fb="
> http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" xmlns="
> http://www.w3.org/1999/xhtml">
> <head>
> <body class="en US rwd rwd full-100pct lightboxed rwd">
> <div id="pagewrap" class="touch-unhover">
> <div id="content-wrap">
> <div class="content clearfix" style="width:790px;padding:30px;">
> <div id="layout">
> <div class="grid-row grid-row-first">
> <div class="grid-row grid-row-last">
> <div class="grid-cell grid-50 cell-first width-100-max-scr2">
> <div class="cell-content gutter-right gutter-bottom">
> <script type="text/javascript" src="
> https://secure.sfdcstatic.com/system/shared/common/assets/js/min/form-builder-min.js
> ">
> <form id="signup_form" class="form-builder-form"
> action="/leadcapture/SignupServlet" method="post" name="signup_form"
> novalidate="novalidate">
> <input type="hidden" value="/form/signup/conf/freetrial-conf-lb.jsp"
> name="conf_page">
> <input type="hidden" value="/cms/form/signup/freetrial-lb.jsp"
> name="startPage">
> <input type="hidden" value="/cms/form/signup/conf/freetrial-conf-lb.jsp"
> name="successPage">
> <input type="hidden" value="/cms/form/signup/conf/freetrial-conf-lb.jsp"
> name="failPage">
> <input type="hidden" value="/" name="resultWebApp">
> <input type="hidden" value="true" name="process_form">
> <input type="hidden" value="/form/signup/freetrial-lb.jsp"
> name="landing_page">
> <input type="hidden" value="lb" name="display_type">
> <input id="elqSiteId" type="hidden" value="2761" name="elqSiteId">
> <input id="elqCookieWrite" type="hidden" value="0" name="elqCookieWrite">
> <input id="elqCustomerGUID" type="hidden" value="" name="elqCustomerGUID">
> <input id="CM_OMTRJoinID" type="hidden" value="" name="CM_OMTRJoinID">
> <input id="Lead.LeadSource" type="hidden" value="Typed/Bookmarked"
> name="Lead.LeadSource">
> <input id="elqFormName" type="hidden" value="FreeTrialNoOptinFTTest2"
> name="elqFormName">
> <input id="elqHandlingInstructions" type="hidden" value="Standard AE EBR
> SR" name="elqHandlingInstructions">
> <input id="Lead.LeadType__c" type="hidden" value=""
> name="Lead.LeadType__c">
> <input id="CampaignMember.Offers__c" type="hidden" value=""
> name="CampaignMember.Offers__c">
> <div id="form-container" class="clearfix narrow ">
> <div id="globalErrorMessage" style="display:none"> Please fill out the
> highlighted fields below. </div>
> <ul class="clearfix vertical form-ul">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-hidden">
> <li class=" type-text">
> <div class="control-container ">
> <div class="label">
> <div class="field">
> <input id="UserFirstName" class="" type="text" maxlength="255" value=""
> name="UserFirstName">
> </div>
> <div class="info">
> </div>
> </li>
>
>
>
>
>
> On Friday, March 15, 2013 1:06:24 PM UTC, [email protected] wrote:
>
>> Hi,
>> Watir-webdriver is unable to input the text field which is in iframe.I
>> would be very thankful if anybody can help me with the issue.I tried
>> different ways but no luck!
>> On the salesforce site after clicking on free trail,a signup form opens
>> to enter the details.I'm unable to enter the firstname in the iframe.
>> https://www.salesforce.com/
>>
>> Thanks in advance...
>>
>>
>> --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
http://www.richdownie.com
http://github.com/richdownie
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.