On Monday, March 18, 2013 6:45:51 AM UTC-7, mc060200778 wrote:

> currently the page is accessible only in my network and not on internet
> just pasting the last lines of the error 
>
> Z=Z[$]?Z[$]:Z[$]={};; return 
> this._.apply(null,arguments);}.apply({navigator:typ
> eof window!='undefined'?window.navigator:null}, arguments);}
> ).apply(null, arguments);
>  
>

> On Mon, Mar 18, 2013 at 5:42 PM, Željko Filipin 
> <[email protected]<javascript:>
> > wrote:
>
>> On Mon, Mar 18, 2013 at 2:40 PM, Sohail Mirza <[email protected]<javascript:>
>> > wrote:
>>  
>>> <input id="btnAddNewCustomer" type="submit" class="ui-button Action" 
>>> value="Create New Customer" onclick="createNewCustomer()">
>>
>>
>> Can you post a link to the page where the problem is reproducible?
>>
>> Željko
>>
>
a bunch of the 'error' you pasted looked to me like some rather extensive 
client side javascript code

Is it possible that the element you are trying to interact with is being 
created or altered (made accessable?) via client side code and your script 
needs to wait for that to happen?

Two things to try..

Firstly, the easiest verification that this is a timing issue, (where you 
need to wait for something to happen in client side javascript) is to 
undertake executing that set of commands manually via IRB.   Use IRB, 
create the browser object, manually navigate to the right place, and then 
start cutting and pasting lines of your script to the IRB command line..  

If that works, since you are working far slower than the script would 
execute the same commands, then the issue is likely one of timing.  The 
script is simply running 'too fast' and is attempting to interact with the 
element before it has been rendered or altered to be accessible by the 
client side code.  (this is typical of pages that have a lot of 'ajax' 
style code).   Usually the easiest solution, and the second thing to try is 
make use of the .when_present decorator to have the script wait for the 
element to become present (not hidden, and able to be interacted with) 
before the action you are trying to take.

  @browser.button(:id => "btnAddNewCustomer").when_present.click 

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