Thanks for your reply i got it worked with regexp check.

On Friday, 12 July 2013 21:51:48 UTC+5:30, johnssn wrote:
>
> I'm not 100% sure what it's doing but you probably need to poll for some 
> condition after 'lookup' so that it knows lookup is done before continuing. 
> Maybe something like this
>
> Watir::Wait.until(60) do
>   br.text =~ /some regexp check/
> end 
>
>
>   ------------------------------
>  *From:* maulik goswami <[email protected] <javascript:>>
> *To:* [email protected] <javascript:> 
> *Sent:* Friday, July 12, 2013 1:58 AM
> *Subject:* [wtr-general] [Watir-WebDriver] Wait until the text-field 
> values are fetched through API
>  
> I am writing the registration script where the API is being called in 
> company registration no field which fetches all the data regarding company 
> and fill it automatically in according text-field like name, phone no, 
> address etc. 
>
> So i want to make the script wait until all text-field vales are filled 
> with values. I have tried the following script but it doesn't wait and 
> clicks on continue button before all the values are fetched.
>
> require "watir-webdriver"
> require "watir-webdriver/wait"
> br = Watir::Browser.new :chrome
> br.goto verification_link
> br.a(:text => "Continue Manually").click
> br.text_field(:id => "regNumber").set "03977902"
> br.button(:id => "populatebtn").click
> Watir::Wait.until(10) {br.text_field(:id => "companyName").value.exists?}
> br.select_list(:id => "companyType").select("Limited")
> br.select_list(:id => "nature").select("Art")
> br.text_field(:id => "sales_turnover").set "12000"
> br.select_list(:id => "why").select("Bill Payment")
> br.button(:id => "lookup").click
> br.button(:id => "continue").click
> -- 
> -- 
> Before posting, please read http://watir.com/support. In short: search 
> before you ask, be nice.
>  
> [email protected] <javascript:>
> http://groups.google.com/group/watir-general
> [email protected] <javascript:>
>  
> --- 
> 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] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>  

-- 
-- 
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.


Reply via email to