Watin - Watin.Core.Exceptions.ElementNotFoundException
 

I have code that runs that gives me the error : Could not find a 'INPUT (text password textarea hidden) or TEXTAREA' tag containing attribute name with value ________ (It's testing a website)

It says it can't find a

What reason could it be that it can't find it? It finds others without an issue on other pages, but this page for some odd reason it baulks? How can that be?

http://www.stackoverflow.com/questions/910720/

        

There are 2 answer(s) to this question.


The WatiN codebase isn't that complex. Download it and run it in debug mode and see where it breaks when the exception is thrown, then you can examine the context surrounding the error.


Hey potterosa, did u manage to sort out the problem that you were having with watiN not finding an element and giving ElementNotFoundException as it couldnt find any Could not find INPUT (hidden) or INPUT (password) or INPUT (text) or INPUT (textarea) or TEXTAREA element tag matching criteria. I am having the exact same error and cannt seem to find out how to sort it out! Any help in this regard will be highly appreciated.

warm regards, BA

Related Questions

WatiN with Safari
WatiN with Safari When can we expect WatiN supports Safari Browser too. Any idea to enhance WatiN support to Safari Browser also?? Please let us know
WatiN, VBScript
WatiN, VBScript I am using WatiN for my web tests. In one of my web pages, I have a VBScript function which opens a dialogbox. I am unable to access it using WatiN. I tried using WatiNTestRecorder; it was unsuccessful. I tried this also: http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2008/07/16/scenario-testing-with-watin.aspx, unsuccessful again. Did you try the VbScriptMsgBoxDialogHandler? Following an example var handler = new VbScriptMsgBoxDialogHandler(buttonToPush); using(new UseDialogOnce(Ie.DialogWatcher, handler )) { Ie.Button("vbScriptMsgBox").ClickNoWait(); handler.WaitUntilHandled(10); Assert.That(handler.HasHandledDialog, "Should have handled dialog
WatiN Mouse right button in WatiN
WatiN Mouse right button in WatiN How to use Right Mouse button in WatiN i tried the follwong code but didn't work.. Div div1 = pzDev.Div("AppExplorer"); Span sp1 = div1.Span(Find.ById(new Regex("cl_"))); NameValueCollection eventProperties = new NameValueCollection(); eventProperties.Add("button", "2"); sp1.FireEvent("onmouseover",eventProperties); Thread.Sleep(1000); sp1.FireEvent("onmousedown",eventProperties); sp1.FireEvent("onmouseup",eventProperties); can any one plz suggest the right approach This should work only if you have javascript event "onmouseover" or "onmousedown",etc. associated to your specified elements. It will not made a right button, just simulate the call to a javascript event, like a right mouse click would have done
WatiN FindByIdStartsWith?
WatiN FindByIdStartsWith? How to find element by start of id in WatiN? Find.ById(x => x.StartsWith(rel) Didn't work somehow. :/ RegEx pwnage => var regex = new Regex(rel + ".*"); var links = Browser.ElementsOfType<Link>() .Filter(Find.By("rel", regex)); Hi, You probably need to check whether x has a value before calling StartsWith() Find.ById(x => x != null && x.StartsWith(rel)) HtH, Jeroen
WatiN or Selenium?
WatiN or Selenium? I'm going to start building some automated tests of our presentation soon. It seems that everyone recommends WatiN and Selenium. Which do you prefer for automated testing of ASP.NET web forms? Why did that product work better for you? As a side note, I noticed that WatiN 2.0 has been in CTP since March 2008, is that something to be concerned about? I've used both, they both seem to work ok. My nod is for Selenium as it seemed to have better Ajax support. I believe WaTiN has matured though since last I used it so it should have the same thing. The biggest thing would be which development environment do you like to be in? Selenium and Watin have recorders but Selenium is in the browser and watin is in visual studio. + and -'s to both of those. I generally use Selenium, mainly because I like the Selenium IDE plugin for FireFox for recording starting points for my
Watin and PDF's
Watin and PDF's Can anyone provide and example of downloading a PDF file using Watin? I tried the SaveAsDialogHandler but I couldn't figure it out. Perhaps a MemoryStream could be used? Thanks, --jb Hi, This code will do the trick. The UsedialogOnce class can be found in the WatiN.UnitTests code and will be part of the WatiN 1.3 release (which will probably be released tonigh 14 october). FileDownloadHandler fileDownloadHandler = new FileDownloadHandler(file.FullName); using (new UseDialogOnce(ie.DialogWatcher, fileDownloadHandler)) { ie.Button("exportPdfButtonId").ClickNoWait(); fileDownloadHandler.WaitUntilFileDownloadDialogIsHandled(30); fileDownloadHandler.WaitUntilDownloadCompleted(200); } HTH, Jeroen van Menen Lead developer WatiN FileDownloadHandler fileDownloadHandler = new FileDownloadHandler(file.FullName); using (new UseDialogOnce(ie.DialogWatcher
Watin - Watin.Core.Exceptions.ElementNotFoundException
Watin - Watin.Core.Exceptions.ElementNotFoundException I have code that runs that gives me the error : Could not find a 'INPUT (text password textarea hidden) or TEXTAREA' tag containing attribute name with value ________ (It's testing a website) It says it can't find a What reason could it be that it can't find it? It finds others without an issue on other pages, but this page for some odd reason it baulks? How can that be? The WatiN codebase isn't that complex. Download it and run it in debug mode and see where it breaks when the exception is thrown, then you can examine the context surrounding the error. Hey potterosa, did u manage to sort out the problem that you were having with watiN not finding an element and giving ElementNotFoundException as it couldnt find any Could not find INPUT (hidden) or INPUT (password) or INPUT (text) or INPUT (textarea) or TEXTAREA element
Watin in TFS?
Watin in TFS? I'm trying to get my WATIN tests to work in TFS2008 (continuous integration) as part of a nightly build. All tests work fine on my local machine (from VS2008), and my unit tests (non-watin) work great locally, as well as in TFS. to illustrate what we're doing I've got a simple test: [TestMethod] public void Watin() { //set up stuff browser.GoTo("http://localhost/"); } When running the test in TFS, this causes the following error: TestTypes\37e36796-fb51-4610-8d5c-e00ceaa68b9f could not be loaded because the TIP could... it. Instead we're using Watin, which is a third party framework. I don't think that Watin has any webloadtest dependencies either. Getting the right assemblies and everything else in place on the build server for doing automated builds of Team System stuff is notoriously difficult. The supported way
Watin IENotFoundException
Watin IENotFoundException I wrote a short bit of WatiN code (see below). it works great in Dev. Just wonderful. When I deploy it to the production server it opens IE, then fails with an IENotFoundException. .NET 3.5 Server 2008 IE 7.0.6 I'm at the point where I'm getting ready to download the source and debug, but I'm not sure how far I'll get as I have yet to reproduce the problem on the development machine. private void WatiNTest() { **IE ie = new IE("the site", true);** ie.WaitUntilContainsText("some text"); if (ie.TextFields.Any(x => x.Id == "nickname_or_email")) { ie.TextField("nickname_or_email").TypeText("my login"); ie.TextField("password").TypeText("my password"); ie.CheckBox("remember_me").Checked = false; ie.Button(Find.ByName("commit")).Click(); } ie.Dispose
Detaching a browser from watin
Detaching a browser from watin Ok, so I am misusing Watin a bit here, maybe a better tool exists (please do suggest!). Anyway I use Watin to log in to a site, and after that I want it to leave the browser window alone... So my question is: Is it possible to use Watin to execute some steps and then abandon the browser completely? Hi, The IE class has a property AutoClose. Set this to false after creating an IE instance and your Internet Explorer instance will stay open after your code has run. HTH, Jeroen BTW this functionality is currently missing for FireFox. I'll add it for the next release
Watin - Browse to HTTPS page
Watin - Browse to HTTPS page How do I get Watin to bypass (or click "OK") when the "this page is being redirected" popup appears when trying to GoTo(url)? For managing dialogs watin has WatiN.Core.DialogHandlers,(like AlertDialogHandler, ConfirmDialogHandler, FileUploadDialogHandler, PrintDialogHandler, and LogonDialogHandler.) I think that for your example I think that AlertDialogHandler should be used. AlertDialogHandler popUp = new AlertDialogHandler(); ie.DialogWatcher.Add(popUp); ie.GoTO(URL); if( popUp.Exists()) { popUp.OKButton.Click(); } ie.WaitForComplete
Watin Dispose() is really slow.
Watin Dispose() is really slow. Hi, My watin tests have suddenly gotten REALLY slow when I dispose the IE object. Here's my setup... * Windows 7 (Evaluation Build 7100) * IE 8 (Version 8.0.7100.0) * Watin (Version 2.0.10.928) This is strange cause the tests were working fine a week or so ago. I think it's the latest MS Updates or something. Thanks Any ideas
Attaching WatiN to Firefox
Attaching WatiN to Firefox Using WatiN, Im facing some issues with FireFox FF = new FireFox ("http://www.google.com");, FireFox always crashes at this point and VS report : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host any idea why this is happening ? Win7 32Bit - VS2008 - .NET 3.5 - Firefox 3.5 - WatiN-2.0.10.928-net-2.0 Doesn't WatiN use COM Interop under the covers? You probably need to run your process as a 32 bit process (i.e. kick off 32 bit NUnit). The jssh that comes with Watin CTP has an issue with FireFox 3.5. I downloaded Swat (Simple Web Automation Toolkit - sourceforge project) and it came with a newer version of jssh which is for FF 3.5 and now Watin starts FF successfully
WatiN error: cannot load
WatiN error: cannot load I am working on a new test project with watiN, but always get this error, Could not load file or assembly 'WatiN.Core, Version=2.0.3.913, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e' or one of its dependencies. An attempt was made to load a program with an incorrect format. Did I miss something? thanks. Do you need to add a reference in your project to the WatiN assembly? Or possibly copy the WatiN assembly to your /bin folder? The assembly appears to be strongly named so you can install it in the GAC (open C:\windows\assembly and drag the dll into there). You may need to download it from the internet if you can't find it on your computer. Failing that, are you on a 64 bit computer? It may be that watin requires you to execute your program as a 32 bit application (In Visual Studio, this is under the "Build Configuration" section). Another thanks
WatiN: MsHtmlBrowser will not TypeText
WatiN: MsHtmlBrowser will not TypeText From the WatiN website: // Open a new Internet Explorer window and // goto the google website. IE ie = new IE("http://www.google.com"); // Find the search text field and type Watin in it. ie.TextField(Find.ByName("q")).TypeText("WatiN"); // Click the Google search button. ie.Button(Find.ByValue("Google Search")).Click(); // Uncomment the following line if you want to close // Internet Explorer and the console window immediately. //ie.Close(); The above sample works just fine. However, since I do not want to open up a browser window, I modified the above code to use MsHtmlBrowser: // goto the google website. var ie = new MsHtmlBrowser(); ie.GoTo("http://www.google.com"); // Find the search text field and type Watin in it. ie.TextField(Find.ByName("q")).TypeText("WatiN

Related watin Video tutorials from Youtube.


Pidgin - English Hangman Game
www.regnow.com Pidgin - English Hangman game for PC. Covers: akamu, arithmetic, b'cus, bi, birthdey,
Pidgin - English Hangman Game
www.regnow.com Pidgin - English Hangman game for PC. Covers: akamu, arithmetic, b'cus, bi, birthdey, chop, com, dat, de, dem, dere, dev, dey, dis, du, e, edey, fit, fo, for, go, grandpapa, hapy, junction, jus, koner, lata, look, los, ma, mama, meet, na, neva, nor, oder, oga, papa, people, period, pidgin, reade, road, rode, sabi, say, sleep, small, sweet, take, tasse, tinewey, todey, tomoro, wan, watin, we, well, wen, were, wey, wich, wun, year, yu, yur, yurself www.websters-online-dictionary.org

Post you comment here

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

There are 0 comment(s) to this page.



The questions and answers taken from stackoverflow.com's public data dump which is licensed under the cc-wiki license.
Logo, website design and layout ©2011 CodingTiger.com