[wtr-general] WIN32OLERuntimeError: unknown OLE server: `AutoItX3.Control'"
hi, When iam running,Iam getting this error .can anybody please help me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] facing issue with clicking buttons
Hi All, I am trying to automate the gmail by clicking on the compose mail and entering to address , subject and body content. I am facing problem in clicking the "Send" button. The button has following HTML elements *Send * I have tried with following script *canvas_frame.button(:text, 'Send').click * canvas_frame is the variable in which the frame is stored. I am confusing because there is no type attribute. It has role attribute i.e role=button. Please help me in going forward... Thanks, Praveen -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] facing issue with clicking buttons
Hi John, I have tried with div, but unable to click on button. Following is the code: require 'watir' require 'test/unit' require 'win32ole' class TC_article_example < Test::Unit::TestCase def test_data $ie = Watir::IE.new $ie.goto("http://mail.google.com/mail/?ui=html";) #Define the excel file excel= WIN32OLE::new("excel.Application") wrkbook=excel.Workbooks.Open("C:\\test.xls") wrksheet = wrkbook.worksheets(1) wrksheet.select #read the data from excel file rows = 2 $username=wrksheet.cells(rows,"A") ['text'] #puts $field $password=wrksheet.cells(rows,"B") ['text'] $ie.text_field(:name,"Email").set($username) $ie.text_field(:id,"Passwd").set($password) $ie.button(:id, 'signIn' ).click #browser.show_frames # We need the iframe with ID 'canvas_frame'. Store it in a var. #$ie.goto("http://mail.google.com/mail/?ui=html";) canvas_frame = $ie.frame(:id, 'canvas_frame') # Get the current user's email address. We'll be sending email to it. my_address = $username mail_subject = 'Hello Watir world!' mail_body_text = 'Hi.' canvas_frame.span(:text, 'Compose Mail').click # Compose new mail canvas_frame.text_field(:name, 'to').set(my_address) canvas_frame.text_field(:name, 'subject').set(mail_subject) mail_body_frame = canvas_frame.frame(:index, 1) mail_body_frame.document.body.setproperty('innerText', mail_body_text) #$ie.goto("http://mail.google.com/mail/?ui=html";) * canvas_frame.div(:text, 'Send').click# Send the message I am facing problem here to click on Send button. It has no attributes like type, value* #canvas_frame.link(:text, 'Sent Mail').click # Browse to sent mail page #assert(canvas_frame.contains_text('Hello Watir world!')) #canvas_frame.link(:text, 'Inbox').click # Return to the inbox page $ie.link(:href,'https://mail.google.com/mail/?logout&hl=en').click $ie.close #rows=rows+1 end end I have also tried with the attribute id, but that is also not working. Please help me and let me know if require any details. Praveen On Thu, Jul 22, 2010 at 10:23 PM, John Fitisoff wrote: > Try treating it as a div rather than a button? > > -- > *From:* praveen kumar > *To:* watir-general@googlegroups.com > *Sent:* Thu, July 22, 2010 5:42:59 AM > *Subject:* [wtr-general] facing issue with clicking buttons > > Hi All, > > I am trying to automate the gmail by clicking on the compose mail and > entering to address , subject and body content. I am facing problem in > clicking the "Send" button. The button has following HTML elements > > * style="-moz-user-select: none;">Send > * > I have tried with following script > > *canvas_frame.button(:text, 'Send').click * > > canvas_frame is the variable in which the frame is stored. > > I am confusing because there is no type attribute. It has role attribute > i.e role=button. > > Please help me in going forward... > > Thanks, > Praveen > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: > watir-general+unsubscr...@googlegroups.com > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] facing issue with clicking buttons
Hi Raveendran, Thanks for the reply... I tried with the all the possibilities you provided.None of them are working. Getting error as "Unable to locate element". Please let me know if any other options. Thanks, Praveen On Tue, Jul 27, 2010 at 11:09 AM, Raveendran P wrote: > Hi Praveen, > > Have you tried these possibilities ? > > *canvas_frame.div(:class, 'J-Zh-I J-J5-Ji Bq L3').flash* > * > canvas_frame.div(:id, ': > 15m > ').flash > canvas_frame.div(:id, ': > 15m > ').flash > > > > * > > > > On Fri, Jul 23, 2010 at 1:32 PM, praveen kumar > wrote: > >> Hi John, >> >> I have tried with div, but unable to click on button. Following is the >> code: >> >> require 'watir' >> require 'test/unit' >> require 'win32ole' >> class TC_article_example < Test::Unit::TestCase >> >> def test_data >> $ie = Watir::IE.new >> $ie.goto("http://mail.google.com/mail/?ui=html";) >> #Define the excel file >> excel= WIN32OLE::new("excel.Application") >> wrkbook=excel.Workbooks.Open("C:\\test.xls") >> wrksheet = wrkbook.worksheets(1) >> wrksheet.select >> >> #read the data from excel file >> rows = 2 >> $username=wrksheet.cells(rows,"A") ['text'] >> #puts $field >> $password=wrksheet.cells(rows,"B") ['text'] >> $ie.text_field(:name,"Email").set($username) >> $ie.text_field(:id,"Passwd").set($password) >> $ie.button(:id, 'signIn' ).click >> #browser.show_frames >> # We need the iframe with ID 'canvas_frame'. Store it in a var. >> #$ie.goto("http://mail.google.com/mail/?ui=html";) >> canvas_frame = $ie.frame(:id, 'canvas_frame') >> # Get the current user's email address. We'll be sending email to it. >> my_address = $username >> mail_subject = 'Hello Watir world!' >> mail_body_text = 'Hi.' >> canvas_frame.span(:text, 'Compose Mail').click # Compose new mail >> canvas_frame.text_field(:name, 'to').set(my_address) >> canvas_frame.text_field(:name, 'subject').set(mail_subject) >> mail_body_frame = canvas_frame.frame(:index, 1) >> mail_body_frame.document.body.setproperty('innerText', mail_body_text) >> #$ie.goto("http://mail.google.com/mail/?ui=html";) >> * canvas_frame.div(:text, 'Send').click# Send the message I am >> facing problem here to click on Send button. It has no attributes like type, >> value* >> #canvas_frame.link(:text, 'Sent Mail').click # Browse to sent mail >> page >> #assert(canvas_frame.contains_text('Hello Watir world!')) >> #canvas_frame.link(:text, 'Inbox').click # Return to the inbox >> page >> >> $ie.link(:href,'https://mail.google.com/mail/?logout&hl=en').click<https://mail.google.com/mail/?logout&hl=en%27%29.click> >> $ie.close >> #rows=rows+1 >> end >> end >> >> I have also tried with the attribute id, but that is also not working. >> >> Please help me and let me know if require any details. >> >> Praveen >> >> >> On Thu, Jul 22, 2010 at 10:23 PM, John Fitisoff wrote: >> >>> Try treating it as a div rather than a button? >>> >>> -- >>> *From:* praveen kumar >>> *To:* watir-general@googlegroups.com >>> *Sent:* Thu, July 22, 2010 5:42:59 AM >>> *Subject:* [wtr-general] facing issue with clicking buttons >>> >>> Hi All, >>> >>> I am trying to automate the gmail by clicking on the compose mail and >>> entering to address , subject and body content. I am facing problem in >>> clicking the "Send" button. The button has following HTML elements >>> >>> *>> style="-moz-user-select: none;">Send >>> * >>> I have tried with following script >>> >>> *canvas_frame.button(:text, 'Send').click * >>> >>> canvas_frame is the variable in which the frame is stored. >>> >>> I am confusing because there is no type attribute. It has role attribute >>> i.e role=button. >>> >>> Please help me in going forward... >>> >>> Thanks, >>> Praveen >
[wtr-general] Best way to handle testdata using Watir
Hi All, I am trying to automate the web application using Watir. I am planning to use the test unit frame work. I need to automate it based on the test scenarios, which are greater than 50. I am planning to maintain read the test data from the spread sheet. 50 work sheets for each scenario. Is that the good idea? What is the best approach to maintain test data for each scenario? Can you please suggest whether test unit frame work is good in this case or any other better framework. Please share your thoughts... Thanks, Praveen -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] WIN32OLERuntimeError: (in OLE method `focus': )
Hi All, When i am trying to execute the following script $ie.text_field(:id, "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) I am getting the below error. I also tried like below...but still facing the same issue. $ie.text_field(:id, "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").focus $ie.text_field(:id, "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) WIN32OLERuntimeError: (in OLE method `focus': ) OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. Please help how to resolve the issue. I am using Watir gem. Thanks, Praveen Vadla -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] WIN32OLERuntimeError: (in OLE method `focus': )
Hi Željko Thanks for the reply.. The element on the page is disabled. They have designed in that way for specific reasons. Do we have any workaround for this type of scenario?. Thanks, Praveen On Tuesday, September 18, 2012 2:35:58 PM UTC+5:30, Željko Filipin wrote: > > On Tue, Sep 18, 2012 at 9:54 AM, praveen kumar > > > wrote: > > Can't move focus to the control because it is invisible, not enabled, or > of a type that does not accept the focus. > > The error message says there is a problem with the element you are trying > to access. Are you sure the element is on the page and enabled? > > Željko > -- > filipin.eu > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] WIN32OLERuntimeError: (in OLE method `focus': )
I re-verified and found that element exists on the page. I am able to use it manually. I am unable to access using Watir...I have provided the html info of that field below https://192.168.5.213/Reference/images/indicator.gif"; /> Thanks, Praveen On Tuesday, September 18, 2012 2:48:52 PM UTC+5:30, Željko Filipin wrote: > > On Tue, Sep 18, 2012 at 11:12 AM, praveen kumar > > > wrote: > > The element on the page is disabled. They have designed in that way for > specific reasons. Do we have any workaround for this type of scenario?. > > If it is disabled, how would you use it manually, without Watir? > > Željko > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: WIN32OLERuntimeError: (in OLE method `focus': )
Hi All, I am able to access the element now. I changed the code from $ie.text_field(:id, "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) to $ie.div(:id,"ctl00_mContentPlaceHolder_divNewProduct").text_field(:id, "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) Now my major issue resolved.. Thanks, Praveen On Tuesday, September 18, 2012 1:24:56 PM UTC+5:30, praveen kumar wrote: > > Hi All, > > When i am trying to execute the following script > > $ie.text_field(:id, > "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) > > I am getting the below error. > > I also tried like below...but still facing the same issue. > > $ie.text_field(:id, > "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").focus > $ie.text_field(:id, > "ctl00_mContentPlaceHolder_ctrlProductAutoComplete").set(productname) > > > > > WIN32OLERuntimeError: (in OLE method `focus': ) > OLE error code:800A083E in htmlfile > Can't move focus to the control because it is invisible, not > enabled, or of a type that does not accept the focus. > HRESULT error code:0x80020009 > Exception occurred. > > Please help how to resolve the issue. I am using Watir gem. > > Thanks, > Praveen Vadla > > > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Unable to click on the links having specific description
Hi All, My requirement is to click on the links present in the table which have text starting with "*test*". I have written the code as below table = $ie.table(:id, "ctl00_mContentPlaceHolder_gvElobratedItems") table.links.each do |link| *# Here I need to click on the link starting with "test"* end So I am getting all the links present in the table. but not finding to click the specific links with "test". Please let me know your thoughts Thanks, Praveen -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Unable to click on the links having specific description
Thanks Dan. It worked for me after doing some minor changes based on my requirement...Actually it worked even though there is no $ie. On Wednesday, September 26, 2012 1:21:36 AM UTC+5:30, Dan wrote: > > You could do something like this > > if $ie.link.text.match(/^test/) then $ie.link.click end > > On Tuesday, September 25, 2012 9:40:07 AM UTC-4, praveen kumar wrote: >> >> Hi All, >> >> My requirement is to click on the links present in the table which have >> text starting with "*test*". I have written the code as below >> >> table = $ie.table(:id, "ctl00_mContentPlaceHolder_gvElobratedItems") >> table.links.each do |link| >> >> *# Here I need to click on the link starting with "test"* >> >> end >> >> So I am getting all the links present in the table. but not finding to >> click the specific links with "test". >> >> Please let me know your thoughts >> >> Thanks, >> Praveen >> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Unable to click buttons in the pop-up when the machine is locked
Hi All, There is a javascript pop-up. I am handling as shown below. It is working fine only if that window is enabled. If the machine is locked or moving to the another window while execution. Its not working. Is there any way to focus that window after pop up is enabled. $ie.wait_until{$ie.javascript_dialog.button('OK').enabled?} $ie.javascript_dialog.button('OK').click Please let me know your thoughts. Thanks, Praveen -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Unable to click buttons in the pop-up when the machine is locked
Watir 3.0.0 On Tuesday, October 2, 2012 1:27:55 AM UTC+5:30, enroxorz wrote: > > What version of Watir are you using? > > On Monday, October 1, 2012 2:26:35 AM UTC-4, praveen kumar wrote: >> >> Hi All, >> >> There is a javascript pop-up. I am handling as shown below. It is working >> fine only if that window is enabled. >> >> If the machine is locked or moving to the another window while execution. >> Its not working. Is there any way to focus that window after pop up is >> enabled. >> >> $ie.wait_until{$ie.javascript_dialog.button('OK').enabled?} >> $ie.javascript_dialog.button('OK').click >> >> Please let me know your thoughts. >> >> Thanks, >> Praveen >> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com