Re: [wtr-general] Watir and Edge Chromium - Getting an error

2020-09-08 Thread Titus Fortner
September 2, 2020 at 2:52:56 PM UTC-4 titusf...@gmail.com > wrote: > >> Oh, except I need to release a version of Watir that allows using >> Selenium 4alpha >> >> On Wednesday, September 2, 2020 at 11:50:47 AM UTC-7 Titus Fortner wrote: >> >>> Ah, o

Re: [wtr-general] Watir and Edge Chromium - Getting an error

2020-09-02 Thread Titus Fortner
Oh, except I need to release a version of Watir that allows using Selenium 4alpha On Wednesday, September 2, 2020 at 11:50:47 AM UTC-7 Titus Fortner wrote: > Ah, ok, this is definitely a bug. Selenium 3.x is not properly handling > the new chromium edge. > > You can f

Re: [wtr-general] Watir and Edge Chromium - Getting an error

2020-09-02 Thread Titus Fortner
Ah, ok, this is definitely a bug. Selenium 3.x is not properly handling the new chromium edge. You can file an issue with this information on Selenium github tracker. https://github.com/SeleniumHQ/selenium/issues/new?template=bug.md The best way forward right now is to update to Selenium 4

Re: [wtr-general] Watir and Edge Chromium - Getting an error

2020-09-02 Thread Titus Fortner
No, I think Google is just being more backward compatible right now, which isn't a bug for microsoft, but for the software calling a bad endpoint. So it could be a Watir Bug. Can you turn on the Selenium logging and show me the full log/stacktrace for the offending section? `Watir.logger.selenium

Re: [wtr-general] Watir and Edge Chromium - Getting an error

2020-09-02 Thread Titus Fortner
Is there a reason you are setting w3c to false? (if you are testing on Chromium > 75 you should be using w3c) Try setting w3c to true, and if it doesn't work, try running it with Chrome. If things are still failing, we'll have to figure out the right bug report for the chromedriver/chromium

Re: [wtr-general] Re: Elements - Multiple locators for same element

2019-12-04 Thread Titus Fortner
thing. Requiring explicitness in this case is a feature not a bug. On Wed, Dec 4, 2019, 6:32 AM Aionitoaie Andrei wrote: > Thanks, > > I was looking something more like OR evaluation. > > luni, 2 decembrie 2019, 22:38:45 UTC+2, Titus Fortner a scris: >> >> Watir al

[wtr-general] Re: Elements - Multiple locators for same element

2019-12-02 Thread Titus Fortner
Watir allows you to locate elements with multiple locators with an implied "AND" it does not support multiple locators with an "OR" evaluation. What is supported is described here: http://watir.com/guides/locating/ On Monday, December 2, 2019 at 1:17:16 PM UTC-6, Aionitoaie Andrei wrote: > >

Re: [wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-08-11 Thread Titus Fortner
If a sleep fixes it, it's a race condition. The rest doesn't matter. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice. watir-general@googlegroups.com

Re: [wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-08-10 Thread Titus Fortner
If a sleep fixes it, then it isn't the test library code or the driver, it has to do with when the app you are testing assigns the events to the elements. Is it angular or react? Essentially the test code is telling the driver to click before the app is ready, even though the element is

Re: [wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-08-03 Thread Titus Fortner
t.allianz-go.com' >> b.text_field(name: 'username').set 'JyoUser' >> b.text_field(name: 'password').set 'Test@123' >> b.button(id: 'producer').click >> > > > > On Friday, 2 August 2019 20:40:54 UTC+5:30, Titus Fortner wrote: >> >> A single click not ha

Re: [wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-08-02 Thread Titus Fortner
August 2019 12:54:56 UTC+5:30, Titus Fortner wrote: >> >> I literally and explicitly said the exact opposite of what you did. >> >> The logs you provided on Github showed the driver only received one >> request to click an element. If you expected it to have recei

[wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-08-01 Thread Titus Fortner
to obtain more logging information. Or even better use a debugger to walk through the code to figure out where the disconnect is. On Wednesday, July 31, 2019 at 10:11:30 PM UTC-7, rajagopalan madasami wrote: > > > > On Friday, 19 July 2019 22:39:27 UTC+5:30, Titus Fortner wrote: >>

[wtr-general] Re: Click succeeds but action as the result of that click is not triggered

2019-07-19 Thread Titus Fortner
The trace you provided only shows a single click, so it isn't a geckodriver issue. Do Watir.logger.level = :debug & Selenium::WebDriver.logger.level = :debug link to a gist with the output. Something appears to be preventing the click command from happening. On Sunday, June 16, 2019 at

[wtr-general] Re: How to write and regular expression in WATIR?

2019-07-19 Thread Titus Fortner
Rubular is a great resource for trying things, and there are plenty of tutorials: https://rubular.com/ If you need both, you have a lot of options, but: /hello.*username/ On Saturday, June 22, 2019 at 9:52:28 AM UTC-7, rajagopalan madasami wrote: > > Consider the below code > > b.element(name:

Re: [wtr-general] Re: Problem with angular WATIR

2019-05-28 Thread Titus Fortner
person bis automating protrator and I am doing the > same in watir. > > On Tue, 28 May, 2019, 10:34 PM Titus Fortner, > wrote: > >> Yeah put the details here. I'll see if I can reproduce it: >> https://github.com/titusfortner/watir_angular/issues/new >> >&g

Re: [wtr-general] Re: Problem with angular WATIR

2019-05-28 Thread Titus Fortner
Yeah put the details here. I'll see if I can reproduce it: https://github.com/titusfortner/watir_angular/issues/new On Tuesday, May 28, 2019 at 10:57:15 AM UTC-5, rajagopalan madasami wrote: > > You are asking me to file a bug in GitHub watir page ? > > On Tue, 28 May, 2019, 7

[wtr-general] Re: Problem with angular WATIR

2019-05-28 Thread Titus Fortner
I'm not sure, it might be a w3c change issue. Can you file an issue on github? On Tuesday, May 28, 2019 at 2:02:02 AM UTC-5, rajagopalan madasami wrote: > > Hi Titus, > > I started using your gem 'watir_angular'. > > I have written the following code > > > b.button(name:

[wtr-general] Re: How to call the custom tags?

2019-05-28 Thread Titus Fortner
I'd need to see the underlying html to know for sure, but it looks like you want to specify the tag name of the following sibling `following_sibling(tag_name: 'div')` On Tuesday, May 28, 2019 at 8:45:37 AM UTC-5, rajagopalan madasami wrote: > > Justin, > > Can you please help me to write this

Re: [wtr-general] Re: Ruby 2.6 is supported

2019-04-29 Thread Titus Fortner
Yeah, I think it is something weird in our specs; I still need to track it down. On Monday, April 29, 2019 at 10:56:44 AM UTC-5, rajagopalan madasami wrote: > > No, I remember you said not all the specs are passed. > > On Mon, 29 Apr, 2019, 9:20 PM Titus Fortner, > wrote: >

[wtr-general] Re: Ruby 2.6 is supported

2019-04-29 Thread Titus Fortner
It should work. Are you noticing an issue? On Monday, April 29, 2019 at 5:48:59 AM UTC-5, rajagopal...@gmail.com wrote: > > Hi Titus, > > Can I use Ruby 2.6? WATIR is supported with Ruby 2.6? > -- -- Before posting, please read

Re: [wtr-general] watir_angular

2019-04-23 Thread Titus Fortner
It's not a project, it's pretty much just a convenient way to inject the protractor implemented angular queue check. It will work great for angularjs, possibly not as well for later versions of angular. On Tue, Apr 23, 2019, 2:40 AM wrote: > Hi Titus, > > It seems like you have created a watir

[wtr-general] What is the default element and page wait in Watir. Do we have to explicitly set PageObject.default_element_wait?

2019-04-14 Thread Titus Fortner
Yes, watir default is 30 seconds, so likely that line is setting it to 10. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice. watir-general@googlegroups.com

Re: [wtr-general] Cant capture alert using "alert" method of Page Object

2019-04-10 Thread Titus Fortner
I don't like the way Page Object uses blocks... In Watir it is simply: alert_text = @browser.alert.text @browser.alert.dismiss On Wed, Apr 10, 2019 at 9:23 PM NaviHan wrote: > > Im trying to capture the alert text and dismiss the alert using the "alert" > method > > def test >

Re: [wtr-general] Re: How to keep the Watir browser run on the backend?

2019-04-10 Thread Titus Fortner
I think it needs to be two strings separated by a comma. I have no idea if it actually works. On Wed, Apr 10, 2019, 11:33 AM NaviHan wrote: > Tried this, browser didnt minimize > > args = ['--allow-running-insecure-content --window-position=-3000, 0'] > browser = Watir::Browser.new :chrome,

Re: [wtr-general] Re: Is there a way to duplicate a tab using Watir

2019-04-10 Thread Titus Fortner
Does the JavaScript work in all browsers? I'm reluctant to add browser specific features if not. If so, make a PR and we can evaluate it. It is low on my list of priorities for code at the moment. -- -- Before posting, please read

Re: [wtr-general] Re: Is there a way to duplicate a tab using Watir

2019-04-10 Thread Titus Fortner
The issue is that it isn't in the w3c: https://w3c.github.io/webdriver/ Probably because not all browsers implement that functionality, so it didn't make sense to put it in the spec. You can request the feature in the spec, but it won't happen any time soon. On Wednesday, April 10, 2019 at

Re: [wtr-general] Re: How to keep the Watir browser run on the backend?

2019-04-10 Thread Titus Fortner
You can set it up to move off the screen when it opens by passing in the args to the ChromeOptions class: https://peter.sh/experiments/chromium-command-line-switches/#window-position it probably will still steal focus momentarily even if it isn't on top of your screen, On Wednesday, April

Re: [wtr-general] Xpath as a selector in hash format. Am I doing it wrong?

2019-03-27 Thread Titus Fortner
:xpath as key is "locate an element with provided xpath value" "xpath" as key is "locate an element with an attribute of 'xpath' that has the provided value" The goal of Watir, in general, though, is to make it so you should never need to use XPath. On Wed, Mar 27, 2019 at 11:24 AM Steve Parrado

[wtr-general] How to check if a collection is present in PageObject?

2019-03-26 Thread Titus Fortner
any? none? empty? And any enumerator methods should work. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice. watir-general@googlegroups.com

[wtr-general] Re: Which is better in PageObject model, using id, class, name to identify elements or using css to identify elements

2019-03-26 Thread Titus Fortner
The other reason to perhaps prefer css is that Page Object gem makes using nested elements harder. span(:remove_all_link, :css=> ".wishlist-remove-all span") I think would need to look like: element(:wishlist_remove_all, :class => "wishlist-remove-all") span(:remove_all_link){

[wtr-general] Re: Which is better in PageObject model, using id, class, name to identify elements or using css to identify elements

2019-03-24 Thread Titus Fortner
The Watir API is designed such that you shouldn't ever need to use CSS (or XPath). Especially with the latest versions where there is no performance penalty to nesting elements. Presumably a Hash of attribute or class key/value pairs is easier to read and parse than CSS selector annotation.

Re: [wtr-general] Re: How do i set selenium script time out?

2019-02-26 Thread Titus Fortner
Try setting w3c: true in Chrome options, maybe I'm using the wrong signature for legacy Chrome. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice.

[wtr-general] Re: How do i set selenium script time out?

2019-02-26 Thread Titus Fortner
I don't have time to test it right now, but it might be a bug. Try Selenium::Webdriver.logger.level = :info See if the timeout information is showing up when you initialize the browser. It's possible that watir isn't seeing both right now. I'm working on fixing it. -- -- Before posting,

[wtr-general] Re: how can I set chrome to a use a specific version?

2019-02-11 Thread Titus Fortner
You install the exact version of Chrome you want on your machine, or you install it separately and set the path with: `Selenium::WebDriver::Chrome.path = "/path/to/my/chrome/binary"` On Wednesday, February 6, 2019 at 3:53:50 PM UTC-6, Joe Fl wrote: > > Hi all. > > I would like to set my watir

[wtr-general] Re: List of items that refresh every second

2019-02-11 Thread Titus Fortner
I'm not certain I understand what you are looking for. For a specific test run you can get a progress bar with an RSpec formatter like https://github.com/thekompanee/fuubar Most of the time, though "Jobs" are "Test Suite Executions" and status is handled by CI tools like Jenkins. On

Re: [wtr-general] WATIR can be used for AngularJS?

2019-01-31 Thread Titus Fortner
This gem used to be a bigger deal because Watir required attribute values to be defined directly. Now that we've opened this up more, all that you get from watir_angular is to be able to inject the automatic waiting calls that are found in Protractor. This may or may not be useful depending on

[wtr-general] Re: Setting Firefox Download folder

2019-01-31 Thread Titus Fortner
Yeah, I don't think profiles are working ideally in Firefox right now, I'm still investigating some of that right now. You want to pass this in as a `prefs` value: Not asking should be default? So I think it should be this: Watir::Browser.new(:firefox, options: {prefs:

[wtr-general] Re: Error

2019-01-31 Thread Titus Fortner
t; > On Friday, 28 December 2018 18:59:43 UTC+5:30, Titus Fortner wrote: >> >> Is this headless & Chrome? There is a chromedriver bug, check stack >> overflow for workarounds... >> >> >> >> On Friday, December 28, 2018 at 1:57:53 AM UTC-6, rajago

[wtr-general] Re: What happened to "cheezy"

2019-01-31 Thread Titus Fortner
He's been keeping busy. He changed companies a couple times, and is teaching a BDD workshop in Toronto next month: https://www.industriallogic.com/canada/ He's posted some things here: https://www.linkedin.com/in/jeffmorgan5/detail/recent-activity/ There are probably more conversations going

[wtr-general] Re: Error

2018-12-28 Thread Titus Fortner
Is this headless & Chrome? There is a chromedriver bug, check stack overflow for workarounds... On Friday, December 28, 2018 at 1:57:53 AM UTC-6, rajagopal...@gmail.com wrote: > > Hi Titus, > > When I run my project, this message always shows up before I run my > program but no hindrance to

Re: [wtr-general] Re: b.select_list.select is not working in 6.16

2018-12-24 Thread Titus Fortner
elected_options.map(&:text) >> #=> ["Mr"] >> >> It would help if you can create an isolated example that reproduces the >> issue. >> >> Thanks, >> Justin >> >> >> On Thursday, December 20, 2018 at 11:52:23 PM UTC-5, rajago

Re: [wtr-general] Re: b.select_list.select is not working in 6.16

2018-12-19 Thread Titus Fortner
Our specs are all passing, so you need to provide a reproducible issue so we can add the use case to our test suite. On Wed, Dec 19, 2018 at 8:50 AM Justin Ko wrote: > > Can you elaborate on what is not working? > > I get the same behaviour in 6.14 and 6.16 when running the below script - ie >

[wtr-general] Re: Selenium::WebDriver::Error::UnhandledAlertError: unexpected alert open: {Alert text : Bad response - parser error!}

2018-12-06 Thread Titus Fortner
Like I said, this is a real error, so you need to talk to your devs to figure out why you're getting this. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice.

[wtr-general] Re: Selenium::WebDriver::Error::UnhandledAlertError: unexpected alert open: {Alert text : Bad response - parser error!}

2018-12-04 Thread Titus Fortner
Put that line of code in your before hook. When an unexpected alert pops up, it'll tell you what exactly was just sent to the browser that caused it. It spits out a lot of text to console, so hopefully the issue is happening frequently enough that you can turn it on for a short time and

[wtr-general] Re: Selenium::WebDriver::Error::UnhandledAlertError: unexpected alert open: {Alert text : Bad response - parser error!}

2018-12-04 Thread Titus Fortner
The issue is that sometimes an alert has popped up. Whenever an alert is present, the driver will not accept any commands that do not deal with that alert. Just like a user can't do anything on a site without dismissing it. That includes screenshots. Rescuing the error won't help if you just

[wtr-general] Re: Issue with watir index or Am I doing something wrong

2018-11-22 Thread Titus Fortner
This code looks for all nested divs, not just divs that are direct children. This is the 2nd div: Card The code is looking for a div nested under that, which isn't there. On Thursday, November 22, 2018 at 8:06:07 PM UTC-6, NaviHan wrote: > > Having trouble using index. > > I have a section of

[wtr-general] Re: obsured? method

2018-11-08 Thread Titus Fortner
We've discussed this several times before, we are not going to make it the default for everyone. What we can do is make it easier for you to set it as a default for your project. That's on the list of things to work on. On Thursday, November 8, 2018 at 12:07:10 AM UTC-6, rajagopalan madasami

Re: [wtr-general] Same problem

2018-11-07 Thread Titus Fortner
I just released 6.15 because it's been waiting for three weeks for me to do that. This fix will likely be in 6.16, whenever we get to releasing it. Any chance you can take a stab at updating the code and making a PR? Procedure for a PR is here:

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
> @b.button(loc.first => loc.last).click > @b.div(id: "spinnerOverlay").wait_while(&:present?) > end > > > On Tue, 6 Nov 2018 at 23:46, Titus Fortner > wrote: > >> I posted it above: >> @b.alert.ok >> @b.div(id: "spinnerOverlay").w

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
solution first and if it works fine then I raise the defect. So now I need > to wait for spinner to disappear before and after the click. Okay. > > On Tue 6 Nov, 2018, 11:46 PM Titus Fortner wrote: > >> I posted it above: >> @b.alert.ok >> @b.div(id: "spinnerOv

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
ould I need to write the code? > > And I have a question, If element goes stale then WATIR automatically > regains the element , right ? It regain in many places which I see. > > On Tue 6 Nov, 2018, 11:39 PM Titus Fortner wrote: > >> It's failing because it goe

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
018 at 12:12:32 PM UTC-6, rajagopalan madasami wrote: > > Okay. Can you please tell me what order should I need to write the code? > > And I have a question, If element goes stale then WATIR automatically > regains the element , right ? It regain in many places which I see. > > On Tu

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
esent unless Wait.timer.remaining_time.positive? > raise_present unless %i[wait_for_present wait_for_enabled > wait_for_writable].include?(precondition) > retry > > So all I am seeing here is, It perfectlys lands on a page, and it > successfully enters into the click method but it waits fo

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
Yes, this makes sense from the code perspective. What your site is doing is requiring you to accept an alert, then it does some kind of processing, then it refreshes some/all of the page. Your code is trying to click the element before the refresh has happened, and because of the way you are

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
iting for true condition on > #"NavContinue", > :tag_name=>"button"}>?[0m > ?[36m# ./Source/FrameWorkModules/Elements/Button.rb:30:in > `waitAndClickButton'?[0m > > > On Tue, 6 Nov 2018 at 21:48, Titus Fortner > wrote: > > This log is showing that

Re: [wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
moves to the next line but application is not replicating that, Application > is not receiving that click so it remains in the same page. > > Do you have any idea how to resolve this without using wait? > > > On Tue, 6 Nov 2018 at 21:17, Titus Fortner > wrote: > >&g

[wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
I will need to see logging information to be able to help further. On Tuesday, November 6, 2018 at 9:49:32 AM UTC-6, rajagopal...@gmail.com wrote: > > Hi Titus, > > something goes terribly wrong while watir waits for element to exist. Even > after page loads completely, button clicks waits

[wtr-general] Re: problem when locating the element

2018-11-06 Thread Titus Fortner
That's weird because it is failing in the wait_for_exists method, but the error message calls the inspect method which shows that it has been located. Can you share your waitAndClick method? I'd like to figure out how to reproduce this. Is it possible for the element to have gone stale? That

Re: [wtr-general] Hiddenfield, Is there a limitation in PageObject

2018-10-25 Thread Titus Fortner
Find method returns a PO element, You are calling puts on that, so the result makes sense. If you move your puts into the block it will print the value you are looking for. On Thu, Oct 25, 2018, 4:56 AM NaviHan wrote: > Found this really confusing behavior while dealing with this element. >

[wtr-general] Re: Problem with Button()

2018-10-24 Thread Titus Fortner
Periodically RubyMine will use the wrong method to do its analysis. There must be another button method somewhere in your required files that doesn't take any parameters. No idea why it's only happening intermittently. If the code is working, you sometimes just have to ignore RubyMine's help.

[wtr-general] Problem with Button()

2018-10-24 Thread Titus Fortner
If you click on the line you should see a small red light bulb pop up on the left that you can click to find out what RubyMine doesn't like. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search

Re: [wtr-general] How do i copy employee dataset into a textbox accurately?

2018-10-14 Thread Titus Fortner
It's hard to know how to help without more information about what "erratic behavior" is. If it's a lot of text, you might try using `#set!` instead of `#set`. it uses javascript instead of Selenium, and it verifies that the value of the field matches what you passed into it. On Sun, Oct 14, 2018

Re: [wtr-general] has anyone experience with executing javascript and extracting datalayer?

2018-10-03 Thread Titus Fortner
Hmm, it should be really difficult to get that exception in watir. Can you provide a stack trace? On Wed, Oct 3, 2018, 3:41 AM 'gary' via Watir General < watir-general@googlegroups.com> wrote: > hi, > > I'm having trouble converting some selenium scripts to watir, lol please > don't ask me why,

[wtr-general] Re: Link Locator

2018-09-28 Thread Titus Fortner
I can't remember, why do you have to use visible_text instead of text? The vast majority of the time text should be both sufficient and performant. That being said, I'm currently working to improve text location performance across the board. On Friday, September 28, 2018 at 7:59:00 AM UTC-7,

[wtr-general] Re: How to handle behavior while pop up loads, is sleep is the only solution?

2018-09-25 Thread Titus Fortner
Also, Watir has a `Element#height` method, so you shouldn't need to resort to JS to get that value. On Tuesday, September 25, 2018 at 11:31:32 AM UTC-7, Titus Fortner wrote: > > Yeah, it's clicking, but I suspect JS event isn't ready to act yet. > > Note the style transitio

[wtr-general] Re: How to handle behavior while pop up loads, is sleep is the only solution?

2018-09-25 Thread Titus Fortner
Yeah, it's clicking, but I suspect JS event isn't ready to act yet. Note the style transition attributes there. Try waiting for the element style to not include "overflow" after the element becomes present. You can also try waiting for the size of the slide dialog container to equal some

[wtr-general] Re: How to handle behavior while pop up loads, is sleep is the only solution?

2018-09-25 Thread Titus Fortner
ial_center = btn.center > btn.wait_until do |btn| > sleep(1) # assuming the animation moves fast enough > new_center = btn.center > initial_center.x == new_center.x && new_center.y == new_center.y > end > btn.click > end > > Justin >

[wtr-general] Re: How to handle behavior while pop up loads, is sleep is the only solution?

2018-09-25 Thread Titus Fortner
This kind of dynamic code is difficult. Firstly, `wait_until(&:present?).click` is currently redundant. The wait will happen automatically if you just do: `click` Essentially the driver is processing the element as displayed before the desired action is attached to that element. Ideally, the

[wtr-general] Re: How to take full screen, screenshots after test fails

2018-09-20 Thread Titus Fortner
Hey Sam. Is now a good time to release the update and publish a blog post about it? :) On Thursday, September 20, 2018 at 8:20:16 AM UTC-7, Sam Nissen wrote: > > Hi Navi -- I created that gem, help maintain it, and would be happy to > help you if you run across any issues. > > On Thursday,

[wtr-general] Re: Maybe look in an iframe? error when clicking button

2018-09-20 Thread Titus Fortner
Ah, yes, it's a Ruby object method and has nothing to do with tapping a screen or the like: https://ruby-doc.org/core-2.5.1/Object.html#method-i-tap foo.click ==> nil foo.tap(&:click} ==> foo For example: def foo result = do_something puts "We did something" result end can be written

[wtr-general] Re: Maybe look in an iframe? error when clicking button

2018-09-20 Thread Titus Fortner
The tap methods returns self after doing whatever is in the block. It lets you chain methods more easily. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice.

Re: [wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
yes On Thu, Sep 13, 2018 at 8:41 PM rajagopalan madasami wrote: > > Waiting for select list is added? > > On Fri 14 Sep, 2018, 7:18 AM Titus Fortner, wrote: >> >> 6.14 was just released, hopefully it addresses your issues. >> On Thu, Sep 13, 2018 at 9:57 AM

Re: [wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
6.14 was just released, hopefully it addresses your issues. On Thu, Sep 13, 2018 at 9:57 AM rajagopalan madasami wrote: > > Yes, I saw this new change in your new article but I can't use WATIR 6.13 > because as you know, its not waiting for select list. > > On Thu 13 Sep, 2018

Re: [wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
Glad I could help, but now I'm going to go refactor everything so it will be less confusing going forward. :) On Thu, Sep 13, 2018 at 6:33 PM NaviHan wrote: > > Got you, Titus > The fundamental aspects are clear now. > > I will get back if I find a real case in my project that is not working as

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
I still don't understand the scenario. If it finds an element at the locator provided, it will stop on a wait_until_present and keep polling on a wait_while_present. Vice versa if an element is not found at that locator. If you have dynamic things happening, your test logic needs to handle it.

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
What action are you trying to accomplish? It sometimes changes back which breaks things? I need to understand the scenario better. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
Ack, I was wrong about that. `#wait_while_present` is equivalent to this: Watir::Wait.while do browser.element(class: 'here').present? end As soon as it does not find the element it is waiting while for, it will exit the waiting loop. If you want to wait for it to go away then come back,

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
If the element's class is changed to 'not-here' and Watir is looking for 'here', then it won't find it and wait_while_present would exit. This will exit immediately: my_element = browser.element(class: 'here') dynamically_change_class(my_element) my_element.wait_while_present These are

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
#wait_while_present will do a #reset! (remove the cache of the driver object) and attempt to locate the element from scratch with the selector `{class: "here"}`. If it finds it, then the wait loop will continue, if it does not find it, it will exit out of the waiting loop. Incidentally, I

Re: [wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
As of 6.13 you can now that wait like this: b.label(id: 'something').wait_until(text: 'Expected Text') On Thursday, September 13, 2018 at 4:40:53 AM UTC-7, rajagopalan madasami wrote: > > Hi Navi, > > yes, you are right with your understanding. > > WATIR locates elements completely different

[wtr-general] Re: How often to get element reference, best practice?

2018-09-13 Thread Titus Fortner
Ok, yes. This is a slight simplification, but think of Watir waiting for what makes the most sense for the provided method. 1. Status Queries --> No automatic waits; immediate response or exception #exists? / #visible? / #present? / #enabled? 2. Information Queries --> Automatically waits

Re: [wtr-general] Re: How often to get element reference, best practice?

2018-09-12 Thread Titus Fortner
Yeah, it is automatic only for action methods, which does not include text. There's a case to be made to extend that behavior to text since it will return an empty string if it isn't displayed, but for now you'll need to keep the wait. On Wed, Sep 12, 2018, 8:19 PM NaviHan wrote: > Hi Titus >

[wtr-general] Re: How often to get element reference, best practice?

2018-09-12 Thread Titus Fortner
Hey Navi, I'm sorry there is so much confusion around the waits. If there is something that would make this article (http://watir.com/guides/waiting/) more clear, please let me know so I can make it better. Maybe I spend too much time focusing on history and implementation details that don't

Re: [wtr-general] Re: Watir [DEPRECATION] ["stale_present"] Checking `#present? == false`

2018-09-11 Thread Titus Fortner
Good news. I figured out how to minimize this message. Everything should be better in 6.14. :) On Tuesday, September 11, 2018 at 8:54:49 AM UTC-7, Titus Fortner wrote: > > The deprecation message is thrown when rescuing a stale exception during a > call for #exists? / #visible?

[wtr-general] Re: How often to get element reference, best practice?

2018-09-11 Thread Titus Fortner
Oh man, that FAQ is kind of dated, and more confusing than I remember it being. I should tidy a couple things there. The specific use case detailed in "Why are my tests taking so long?" section of that FAQ is going to be rare, and very unlikely to apply to you. So you should just ignore that

Re: [wtr-general] Re: Watir [DEPRECATION] ["stale_present"] Checking `#present? == false`

2018-09-11 Thread Titus Fortner
program. > > I am well aware of how element is located in selenium and WATIR. but I > don't understand the deprecation message has to be thrown such a meaningful > method. Please remove this message completely. > > Thanks. > > On Thursday, September 6, 2018 at 7:

Re: [wtr-general] Re: Watir [DEPRECATION] ["stale_present"] Checking `#present? == false`

2018-09-05 Thread Titus Fortner
am asking the former, I need to wait until spinner goes away. So > former one is necessary for me. Buy why do you plan to deprecate such a > good method which is very much necessary? > > On Wed 5 Sep, 2018, 8:06 PM Titus Fortner, > wrote: > >> It has to do with how Watir

[wtr-general] Re: Watir [DEPRECATION] ["stale_present"] Checking `#present? == false`

2018-09-05 Thread Titus Fortner
It has to do with how Watir caches elements and being consistent in how it responds. "#present?" is asking "can a user see an element at this location?" This is different from "did the element I previously located change?" If you are asking the former, you're fine. If you are asking the latter,

Re: [wtr-general] Re: NoSuchElementError

2018-09-04 Thread Titus Fortner
I mostly have the fix. There's some frame driver optimization that I realize is still needed. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice.

Re: [wtr-general] Re: NoSuchElementError

2018-09-03 Thread Titus Fortner
, 2018 at 8:03:00 AM UTC-7, rajagopalan madasami wrote: > > Titus, something really bad happened, now select list is not waiting for > element to exist, it immediately throws the error. Previous version works > fine. Something is missed. > > On Mon 3 Sep, 2018, 11:49 AM Titus

Re: [wtr-general] Re: NoSuchElementError

2018-09-03 Thread Titus Fortner
taking that element html >> and posting it here. >> >> I have posted a question in Stackover flow, can you please answer me >> there? >> >> >> https://stackoverflow.com/questions/52130793/select-method-and-option-method-works-differently >> >> On F

Re: [wtr-general] Re: NoSuchElementError

2018-08-30 Thread Titus Fortner
> On Thu 30 Aug, 2018, 4:59 AM Titus Fortner, wrote: >> >> Yes, Watir is only going to iterate over the link elements instead of all of >> the elements to find the matching text. If there is a class or other >> attribute that would further filter out links, tha

Re: [wtr-general] Re: NoSuchElementError

2018-08-29 Thread Titus Fortner
wire calls. watigiri is limited by not being able to distinguish between "visible" and "non-visible" text. On Wednesday, August 29, 2018 at 4:19:47 PM UTC-7, rajagopalan madasami wrote: > > Ah, okay , that makes difference? Okay let me check it today how it works. > >

Re: [wtr-general] Re: NoSuchElementError

2018-08-29 Thread Titus Fortner
Are you using element or link method? -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general

Re: [wtr-general] Re: NoSuchElementError

2018-08-29 Thread Titus Fortner
You should be able to do a direct replacement with visible_text locator, just with the option of adding additional locators as desired. -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before

Re: [wtr-general] Re: NoSuchElementError

2018-08-28 Thread Titus Fortner
madasami wrote: > > Thank you. > > On Tue 28 Aug, 2018, 11:31 PM Titus Fortner, > wrote: > >> Interesting: >> https://github.com/SeleniumHQ/selenium/commit/406b8dab98ed7a06bbc35728fb2b061d068d9238 >> I'll dig into what this is supposed to be doing so I can fig

Re: [wtr-general] Re: NoSuchElementError

2018-08-28 Thread Titus Fortner
Interesting: https://github.com/SeleniumHQ/selenium/commit/406b8dab98ed7a06bbc35728fb2b061d068d9238 I'll dig into what this is supposed to be doing so I can figure out the fix. On Monday, August 27, 2018 at 9:40:02 PM UTC-7, rajagopalan madasami wrote: > > Beautiful, thanks. > > On Tue 28 Aug,

Re: [wtr-general] Re: Trouble reading the text from Popup , Using Watir and Pageobject

2018-08-09 Thread Titus Fortner
So are you thinking the popup had already gone away on remote? Are you sure it was ever opened in the first place? 10 seconds should be plenty of time to get information off of something. Is there something happening on the site or in the code that would keep you from getting that information in

[wtr-general] Re: Trouble reading the text from Popup , Using Watir and Pageobject

2018-08-08 Thread Titus Fortner
Can you take a screenshot? Often the problem part is the step before the error, so you need to actually see what is happening. No waiting strategy will work if the element never becomes present. -- -- Before posting, please read

Re: [wtr-general] Re: Trouble reading the text from Popup , Using Watir and Pageobject

2018-08-08 Thread Titus Fortner
In general, what is going on remotely is that the page is taking slightly longer to load relative to what you have locally, so the Selenium command is trying to execute before the site is ready for it Does this help to explain the difference between #wait_until and #wait_while?

  1   2   3   4   >