These are chat archives for cucumber/cucumber-ruby

18th
Aug 2016
Sakib Mahmud
@isakib
Aug 18 2016 03:28
This message was deleted
Sakib Mahmud
@isakib
Aug 18 2016 04:00

@mattwynne sorry to tag you directly.

Into very critical situation. In our project, we have some data input states. While user in this states, such as “Save, Cancel, Close” — If user want to close Browser or Tab, we show them popup messages "This page is asking you to confirm that you want to leave - data you have entered may not be saved”

Which is fine.

Now, all of our scenario are isolated from another scenario. In case of, in between (while input field in state of save, cancel, close) is opended — somehow response hasn’t come to client side or ajax request has not procced properly — timeout occurred, and that scenario has failed. It’s time for webdriver to quit the browser and re-run the webdriver browser to run next scenario.

Now, browser is holding the end user with this message "This page is asking you to confirm that you want to leave - data you have entered may not be saved”. Not allowing to move on to next scenario script automation execution. We don’t handle or can’t handle such sudden situation and even by accepting or dismissing the js popup — as far as I understand.

As it occured, all the time webdriver trying to close the browser and it fails to close. So, all the scenario run through the current situation (popup is cont flickering), as cucumber it attempting to run the next scenario and popup is opening to close it first.

Now, as of this change — we have about 1100 scenario, about 90% of them are isolated scenario and most of them are failing — if that failure occured “once”, that popup arises once!

I’ve prepared a very small demo for you http://screencast.com/t/84E9B321VDg — if you can grab the issue

Any idea what to do, in such situation?

nixfreak
@nixfreak
Aug 18 2016 13:53
I have a question if I have a text_field and the field requires a new request id every time, how would you go about looking to see if the request id was taken or not , and if it was taken, then you would enter a new one in. I am trying to figure this out without every time adding a static requestid in the code
blueice349
@blueice349
Aug 18 2016 14:39
Is there anyway to have more then one window or tab running for a test? so what I want would be this:
Scenario: I do everything in window one then open a new window / tab

                    When I navigate to "([^\"]*)"
                    And I open new window / tab?????

Scenario: I do things in the new window

                    When I navigate to "([^\"]*)"
                    And I close new window / tab????
                    And I go back to previous window / tab????

Scenario: I do things in previous window / tab ( first window / tab )
                     When I navigate to "([^\"]*)"

I seen these canned steps, but not sure what they are doing?

To switch between windows use following steps :

Then I switch to new window
Then I switch to previous window
Then I switch to window having title "(.*?)"
Then I close new window
Then I switch to main window

To switch between frames use following steps :

Then I switch to frame "(.*?)"
Then I switch to main content

nixfreak
@nixfreak
Aug 18 2016 14:45
yes its frame
frame for frame or iframe
blueice349
@blueice349
Aug 18 2016 18:39
could you give me a simple test not sure I understand how its working
b.frame(:id => "content_ifr").send_keys "hello world"