I found in another forum that the contains_text method has been deprecated in watir webdriver. I will be darned if I can find documentation showing precisely what methods webdriver supports. You might think http://watirwebdriver.com/ would have that. But, hmmm, no.
The API docs are a good starting place to look for supported methods - http://rubydoc.info/gems/watir-webdriver/frames.
For contains_text, you should just get the text using the text method and then use Ruby's string comparison methods.
You could do one of the following:
browser.text.include?(str)
browser.text =~ /regexp/
Related
I'm using a generator based on io.swagger's swagger-core + swagger-jaxrs library v1.5.13 and I wonder if there's an option to avoid allOf syntax. The other tool we use doesn't support the allOf syntax and we can't use it.
I don't like bending our java model just because of one problematic technology, is there and option how to tell the library not to generate allOf and flatten the view on a hirarchy of objects instead?
I already have a custom ModelResolver, but I hope for a more elegant solution than transforming the syntax with my code.
when I develop a custom language IDE using avalonedit, I encountered a problem. I use regex to check the syntax, and it works as designed. However, I want to show the syntax error with wave text mark. I did search at google, yet the solution is either outdated or not feasible. Any ideas? Thanks ahead.
AvalonEdit does not have this functionality built-in. However it provides all the infrastructure needed to implement it yourself. In the SharpDevelop IDE we have an implementation that should suit your needs.
You'll need some of the code from the SharpDevelop repository (https://github.com/icsharpcode/SharpDevelop/):
TextMarkerService, TextMarker
and its related interfaces and enums.
To make it easier for you, I have created a small sample application:
https://github.com/siegfriedpammer/AvalonEditSamples/tree/master/TextMarkerSample
It uses the AvalonEdit 5 nuget package and contains the classes mentioned above, plus a WPF Window to test it.
I have some dll's for which i want to run code coverage using TestDriven.net (ncover) with vs2010. There are some methods which i don't want to be included in the coverage result since those methods are already written by some other programmer the option of using CoverageExclusion attribute is not feasible.
Is there any other way out ?
Unfortunately, as far as I can tell, Testdriven.NET does not yet support using other NCover arguments, like //ea.
I found this post, where it was last discussed and Jamie Cansdale at Testdriven confirmed this:
https://groups.google.com/group/testdrivenusers/browse_thread/thread/a0dc80c40c5f8815?pli=1
I found an interesting post about using NCover 3.4.x with Testdriven, just FYI:
http://thepursuitofalife.com/how-to-connect-ncover-3-x-with-testdriven-net/
So, my best advice is to contact support#testdriven.net to find out the latest on configuring and using NCover parameters.
Best Regards,
NCover Support
NCover has a command line parameter //ea which stands for 'exclude attributes'. It allows you to provide a list of attributes marking classes or methods to exclude from coverage.
There is a blog post about it here.
This feature works with the version of NCover that comes with TestDriven.NET (1.5.8).
how to draw next image with labels in rectangles? thanks for help:
Use the different classes in the System.Drawing namespace.
Alternatively, use one of the many drawing libraries around.
Note:
The documentation on MSDN gives the following warning:
Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see Windows Imaging Components.
However, I and others who have done so have not found problems. Even MSDN magazine suggests it...
There's a very good, detailed article at the 4guysfromrolla web site. I used this the first time I needed to do such a thing, and I still use the same pattern.
https://web.archive.org/web/20211020111734/https://www.4guysfromrolla.com/articles/042209-1.aspx
This one is fairly good as well, but nowhere near as well-explained as the first one. http://blogs.sitepoint.com/generating-asp-net-images-fly/
I'm only familiar with the no-frills javadoc generator, however I'd like to include some mathematical equations in my javadoc (rather than constantly referencing another document).
Is there a convenient option to do something like include/properly render LaTeX (most preferred - then I could just cut-n-paste) or MathML tags?
Check out Doxygen.
It's blazing fast, free, and supports embedded LaTeX.
Maybe something like MathJax or jsMath could be your solution. They're both JavaScript libraries, so you'll have to find a way to add them into your javadocs pages.
While I haven't done it personally, there are ways to create your own using the Doclet or Taglet API to create your own Doclet or Taglet. Several of these have already been done according to a quick search providing one such example http://www.ohloh.net/p/latextaglet
If you're feeling daring enough the latextaglet project is open source, so you might be able to further adapt it to your needs.