4

Like Michael said the Page object pattern makes the finder easier to use. I try to maintain a pattern of having a test only verifying one thing or possibly one screen. In your example I would assume in your first test, you would be testing everything about the post being visible. In your 2nd test, the create a post step is only a setup step so that you have ...


4

I use the page object pattern myself. It addresses two main things: Defines the finder in one place Names the finder with english-like words Good things. However this doesn't address the issue of how to combine series of steps that are then used in multiple places. To do this you can use use functions / procedures / methods in the language you are ...


3

No The highest version of Safari for Windows is too old. It's also not able to handle many modern web technologies, so you're better off using either a containerized version of Safari, or sticking to Mac OS to test Safari.


3

In my experience, as you correctly mentioned, if creation fails, deletion cannot be even tested, so in fact you have just one test with 2 separate test conditions. So far for every separate scenario I have only one test with multiple test conditions. Test starts with preparing system to certain status, which will be irrelevant for other tests. Then all ...


2

It's possible to force this status with a Javascript injection via execute_script. To simulate a visible document: Object.defineProperty(document, 'visibilityState', {value: 'visible', writable: true}); Object.defineProperty(document, 'hidden', {value: false, writable: true}); document.dispatchEvent(new Event("visibilitychange")); To simulate an hidden ...


1

Watir is powered by Selenium WebDriver, which doesn't have a proxy built-in to do this sort of thing. A few suggestions are made over on SO. In the past (working in C#) I was able to use the Fiddler core proxy to inspect traffic after making a response.


1

The browser being the topmost app on the OS is actually (what I would call) a meta state that is outside of Selenium's scope of dealing with apps and browser settings. So, if you really need the browser to always be on top, I would suggest extending your test initialize with a logic like this: Initiate driver: browser opens Initiate a tool to automate ...


1

There are two directions you can take if you want to run the UI test on a Mac with Jenkins: Setup a Jenkins slave on the Mac and execute all Jenkins steps on that node. Example blog post: https://blog.samsaodev.com/how-to-setup-a-jenkins-slave-running-mac-osx-for-ios-projects-part-1/ Setup a Selenium Webdriver grid and let Jenkins run the tests on the Mac ...


1

In order to access elements in frames you first need to switch to them. Try to use driver.switch_to.frame "iframeResult" first and afterwards try to find or interact with the input elements.


1

In Linux you could write a bash shell script to load a database so you are at a known place for your testing. In windows you could use PowerShell to do it quite easily for MS SQL. There should be automation options for all the mature databases. As you don't specify your OS or database more specific help is unlikely. A sane thing you might consider doing ...


1

Maulik, Instead of waiting until a value exists, how about trying something along the following lines: br.wait_until{br.text_field(:id=> 'companyName').text.eql?("") == false}


1

Although I haven't had to do this in a few years, I always found the win32OLE to be my best friend in these cases. Can't seem to find any of my old code samples. Doing a quick search, I came across a fairly good tutorial here by David Sulc with this particular post seeming to cover exactly what you're looking for.


1

Instead of searching if Watir works on JRuby, you could have just tried it, like I did: $ ruby -v jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_37-b06-434-11M3909 [darwin-x86_64] $ gem install watir ... Successfully installed watir-4.0.2 $ irb > require "watir" => true > browser = Watir::Browser.new :...


1

To use Chrome in Webdriver you have to be sure you did two things: chromedriver.exe is on your classpath you have to build a wrapper so the code knows where to find the binary and can start the chromedriverservice. More info can be found here


1

If you are using Firefox driver you do not have to go through the additional steps. However, we have to go through the additional steps if we use chromedriver. Did you perform those steps?


Only top voted, non community-wiki answers of a minimum length are eligible