watir

How do I turn off the logging for PhantomJS in Watir-WebDriver?

…衆ロ難τιáo~ 提交于 2019-12-02 05:11:54
问题 I see a lot of logging information for PhantomJS in my ruby (1.8) watir code, i.e INFO messages. How do I turn it off ? I got the Java code from google search but not ruby code. Java PhantomJSDriver disable all logs in console PhantomJS is launching GhostDriver... [INFO - 2015-01-27T10:00:00.000Z] GhostDriver - Main - running on port 8910 [INFO - 2015-01-27T10:00:00.000Z] Session [30344df0-a7de-11e4-9220-5bf7aac4a098] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,

How to disable download window in firefox with watir-webdriver?

空扰寡人 提交于 2019-12-02 01:18:55
I don't want to handle download window in Firefox or IE. I want to auto download the excel file without any download window. I have tried to set several configuration parameters for Firefox, but it didn't work. In my test I'm trying to download excel file profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.lastDir'] = 'C:\\Downloads' profile['browser.download.folderList'] = 2 profile['browser.download.dir'] = 'C:\\Downloads' profile['download.prompt_for_download'] = false profile['browser.download.manager.showWhenStarting'] = false profile['browser.download.manager

Ruby/Watir : firefox headless

让人想犯罪 __ 提交于 2019-12-02 00:47:26
according to this: https://developer.mozilla.org/en-US/Firefox/Headless_mode firefox 57+, has the ability to run in headless mode. i tried to use it with this: omg3r = Watir::Browser.new :firefox, profile: 'omg3r', args: "-headless" and i couldn't find an example to how to properly send arguments to firefox in watir. help please If you are using Watir 6.9 you can try: omg3r = Watir::Browser.new :firefox, profile: 'omg3r', headless: true http://watir.com/watir-6-9/ example your browser is in case statement as firefox-remote when "firefox-remote" options = Selenium::WebDriver::Firefox::Options

What's the difference between `visible?` and `present?`?

只谈情不闲聊 提交于 2019-12-02 00:34:26
问题 From the Watir API, I've derived two assertions (which of course might not be correct): I can use exists? if I simply want to verify that the element is in the HTML. I don't care if it's visible or not. I can use visible? if I want to be able to see it on the page. So, when do I use present? ? It seems to me that I could answer my own question by saying: I can use present? if I want to be able to see it on the page, but I don't want it to be in the HTML. So, if I write something on the screen

FireWatir TextField set : Very Slow

对着背影说爱祢 提交于 2019-12-01 23:51:13
When calling the set method of a text_field in ruby, the text is being entered at a very slow rate in the browser, roughly at 1 character / second. Environment Information: Ubuntu 10.10 FireFox 3.6.13 JSSh 0.9 Ruby 1.9.2p136 FireWatir 1.7.1 Kindly advice. Thanks in advance. It is a known bug: WTR-397 Workaround is to use watir-webdriver or to use value= instead of set . Example: browser.text_field(how => what).value= "string" shay solve slow key type issue on firewatir: need to edit the file text_field.rb enter to the folder #>cd /usr/lib/ruby/gems/1.8/gems/firewatir-1.7.1/lib/firewatir

Watir and text field inside iframe

荒凉一梦 提交于 2019-12-01 23:43:44
I'm trying to setup new text into a text field using Watir. The text field is placed inside iframe. <div id="div_popup_layer" style="width: 100%; height: 100%;"> <div id="id_Login" class="ui-draggable" style="position:absolute;left:372.5px;top:279px;width:501px;height:274px;z-index:15"> <table id="popup_cont_id_Login" cellspacing="0" cellpadding="0" topmargine="0"> <tbody> <tr> <td align="left" valign="middle"> <iframe id="frame_id_Login" height="274px" frameborder="0" width="501px" allowtransparency="true" src="/sws.login/gnb/loginView.sws?basedURL=undefined&popupid=id_Login" tagtype="popup

Ruby/Watir : firefox headless

六月ゝ 毕业季﹏ 提交于 2019-12-01 23:37:15
问题 according to this: https://developer.mozilla.org/en-US/Firefox/Headless_mode firefox 57+, has the ability to run in headless mode. i tried to use it with this: omg3r = Watir::Browser.new :firefox, profile: 'omg3r', args: "-headless" and i couldn't find an example to how to properly send arguments to firefox in watir. help please 回答1: If you are using Watir 6.9 you can try: omg3r = Watir::Browser.new :firefox, profile: 'omg3r', headless: true http://watir.com/watir-6-9/ 回答2: example your

How to stop chromedriver from opening settings tab automatically?

假装没事ソ 提交于 2019-12-01 22:29:21
问题 When I run ruby watir script for opening chrome browser, it also opens up another chrome tab with address "chrome://settings/help" and sets focus on that. How can I disable such additional tabs getting created? 回答1: Update: I updated the chromedriver to 2.33 that the selenium-standalone package uses and the config of the selenium server. The tab is not appearing anymore. You can try to update the chromedriver that your ruby script uses to 2.33. If you need my Chrome version, it is currently

How to stop chromedriver from opening settings tab automatically?

∥☆過路亽.° 提交于 2019-12-01 21:30:55
When I run ruby watir script for opening chrome browser, it also opens up another chrome tab with address "chrome://settings/help" and sets focus on that. How can I disable such additional tabs getting created? Update: I updated the chromedriver to 2.33 that the selenium-standalone package uses and the config of the selenium server. The tab is not appearing anymore. You can try to update the chromedriver that your ruby script uses to 2.33. If you need my Chrome version, it is currently 62.0.3202.89 (64 bit) for Mac OS. I ran into this issue when I tried to used our selenium automation in

How can we get Watir-Webdriver to work with the IE invalid cert screen?

梦想的初衷 提交于 2019-12-01 21:15:44
We've probably all seen this screen when testing, all you need is a HTTPS site with a self signed cert and you get the "There is a problem with this website's security certificate" screen, which requires you to click a link to continue. With Watir this is no problem, I automate the screen as I would any other webpage, clicking the link according to its text or ID value. With Watir-Webdriver it's as if nothing inside the HTML can be recognized. and I'm not alone in this See this question It's not just trying to click a link, nearly anything you try here will fail on this page Even a simple