Hi Titus
@browser.div(:class => 'address-details', :index =>0).click
# alert_text = alert do
# @browser.div(:class => 'select-checkbox', :index =>1).click
# end
# sleep 10
# puts alert_text
@browser.div(:class => 'select-checkbox', :index =>1).click
puts @browser.
On Thursday, 11 April 2019 12:23:16 UTC+10, NaviHan wrote:
>
> Im trying to capture the alert text and dismiss the alert using the
> "alert" method
>
> def test
> @browser.div(:class => 'address-details', :index =>0).click
> alert_text = alert do
> @browser.div(:class => 'select-
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
> @browser.d
Im trying to capture the alert text and dismiss the alert using the "alert"
method
def test
@browser.div(:class => 'address-details', :index =>0).click
alert_text = alert do
@browser.div(:class => 'select-checkbox', :index =>1).click
end
sleep 10
puts alert_text
en
args = ['--window-position=-3000,0']
browser = Watir::Browser.new :chrome, options: {args: args}
Doesnt work either.
Can the OP confirm if it works for him?
On Wednesday, 10 April 2019 22:42:13 UTC+10, watirQ wrote:
>
> Experts
>
> Each time when use .goto or open a new tab, the browser win
Nowadays all people are using chrome or firefox, JavaScript would perfectly
be executed in these two browsers. Okay its not a problem if you don't want
to add it. I have created specific function my framework to accomplish this
task so it's not a problem for me.
On Thu, 11 Apr, 2019, 12:06 AM Titu
The --window-position arguments should be without a space - eg:
args = ['--window-position=-3000,0']
browser = Watir::Browser.new :chrome, options: {args: args}
Note that this is just positioning it off-screen; not actually minimizing.
Justin
On Wednesday, April 10, 2019 at 12:33:41 PM UTC-4,
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,
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
https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-
I felt it somehow because it is the common need to everyone so this kind of
request must have been raised. Perhaps WATIR may give some functionality to
achieve this result wrapping up this JavaScript code like watir does for
click using click!
On Wed, 10 Apr, 2019, 10:23 PM Titus Fortner,
wrote:
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 11:4
Yes, driver is not giving any way to this Job. Neither chrome nor
geckodriver. You may ask them to add it in github!
Here
https://github.com/mozilla/geckodriver/issues
For Chrome here
https://bugs.chromium.org/p/chromedriver/issues/list
On Wed, 10 Apr, 2019, 10:05 PM NaviHan, wrote:
> I want
I want to duplicate the browser in a new tab. Not open a blank new tab.
And are we sure that javascript is the only way to open a new tab?
On Wednesday, 10 April 2019 13:39:32 UTC+10, NaviHan wrote:
>
> Is there a way to duplicate a tab using Watir?
>
> (in chrome, right click on tab>Duplicate ta
Tried this, browser didnt minimize
args = ['--allow-running-insecure-content --window-position=-3000, 0']
browser = Watir::Browser.new :chrome, options: {args: args}
Titus is this correct?
On Wednesday, 10 April 2019 22:42:13 UTC+10, watirQ wrote:
>
> Experts
>
> Each time when use .goto or
It would still bring the screen to the front when alert appears.
On Wed, 10 Apr, 2019, 9:50 PM Titus Fortner, wrote:
> 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
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 10
But it will still shows up for some seconds.
On Wed, 10 Apr, 2019, 7:42 PM NaviHan, wrote:
> Try this after you open the browser
> browser.window.move_to(-3000, 0)
>
> This will minimize the window
>
> On Wednesday, 10 April 2019 22:42:13 UTC+10, watirQ wrote:
>>
>> Experts
>>
>> Each time when
Try this after you open the browser
browser.window.move_to(-3000, 0)
This will minimize the window
On Wednesday, 10 April 2019 22:42:13 UTC+10, watirQ wrote:
>
> Experts
>
> Each time when use .goto or open a new tab, the browser window will lump
> to the frontend of the screen. How to keep the
That's not possible from WATIR. Its in the control of the driver.
On Wed, 10 Apr, 2019, 6:12 PM 'watirQ' via Watir General, <
watir-general@googlegroups.com> wrote:
> Experts
>
> Each time when use .goto or open a new tab, the browser window will lump
> to the frontend of the screen. How to keep
Experts
Each time when use .goto or open a new tab, the browser window will lump to
the frontend of the screen. How to keep the Watir browser run on the
backend, so that will not interrupt other works
Thanks
--
--
Before posting, please read
https://github.com/watir/watir_meta/wiki/Guidel
20 matches
Mail list logo