Search Results

Search found 127 results on 6 pages for 'watir webdriver'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • How to set the URL of a link to a variable using WATIR

    - by Alex
    Using WATIR and Excel, I'd like to take the first row of a table in Excel, visit the URL, then set the 12th link on the page as a variable in the cell next to the cell with the URL, then go to the next line and repeat. I'm stuck on getting the URL of the 12th link on the page to set as a variable that I can feed into the next cell in Excel. Here's what I have and it's not working. worksheet = workbook.WorkSheets(1) # get first workbook #declare test site test_site = worksheet.Range("a2").text #open ie ie = Watir::IE.new #go to test_site ie.goto test_site #find primlink ie.link(:index, 12).text = "primlink" puts primlink Any ideas?

    Read the article

  • Webdriver PageObject Implementation using PageFactory in Java

    - by kamal
    here is what i have so far: A working Webdriver based Java class, which logs-in to the application and goes to a Home page: import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.testng.AssertJUnit; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class MLoginFFTest { private WebDriver driver; private String baseUrl; private String fileName = "screenshot.png"; @BeforeMethod public void setUp() throws Exception { FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("network.http.phishy-userpass-length", 255); profile.setAssumeUntrustedCertificateIssuer(false); driver = new FirefoxDriver(profile); baseUrl = "https://a.b.c.d/"; driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); } @Test public void testAccountLogin() throws Exception { driver.get(baseUrl + "web/certLogon.jsp"); driver.findElement(By.name("logonName")).clear(); AssertJUnit.assertEquals(driver.findElement(By.name("logonName")) .getTagName(), "input"); AssertJUnit.assertEquals(driver.getTitle(), "DA Logon"); driver.findElement(By.name("logonName")).sendKeys("username"); driver.findElement(By.name("password")).clear(); driver.findElement(By.name("password")).sendKeys("password"); driver.findElement(By.name("submit")).click(); driver.findElement(By.linkText("Account")).click(); AssertJUnit.assertEquals(driver.getTitle(), "View Account"); } @AfterMethod public void tearDown() throws Exception { File screenshot = ((TakesScreenshot) driver) .getScreenshotAs(OutputType.FILE); try { FileUtils.copyFile(screenshot, new File(fileName)); } catch (IOException e) { e.printStackTrace(); } driver.quit(); } } Now as we see there are 2 pages: 1. Login page, where i have to enter username and password, and homepage, where i would be taken, once the authentication succeeds. Now i want to implement this as PageObjects using Pagefactory: so i have : package com.example.pageobjects; import static com.example.setup.SeleniumDriver.getDriver; import java.util.concurrent.TimeUnit; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.FluentWait; import org.openqa.selenium.support.ui.Wait; public abstract class MPage<T> { private static final String BASE_URL = "https://a.b.c.d/"; private static final int LOAD_TIMEOUT = 30; private static final int REFRESH_RATE = 2; public T openPage(Class<T> clazz) { T page = PageFactory.initElements(getDriver(), clazz); getDriver().get(BASE_URL + getPageUrl()); ExpectedCondition pageLoadCondition = ((MPage) page).getPageLoadCondition(); waitForPageToLoad(pageLoadCondition); return page; } private void waitForPageToLoad(ExpectedCondition pageLoadCondition) { Wait wait = new FluentWait(getDriver()) .withTimeout(LOAD_TIMEOUT, TimeUnit.SECONDS) .pollingEvery(REFRESH_RATE, TimeUnit.SECONDS); wait.until(pageLoadCondition); } /** * Provides condition when page can be considered as fully loaded. * * @return */ protected abstract ExpectedCondition getPageLoadCondition(); /** * Provides page relative URL/ * * @return */ public abstract String getPageUrl(); } And for login Page not sure how i would implement that, as well as the Test, which would call these pages.

    Read the article

  • How do I confirm a pdf loaded correctly with Watir webdriver testing

    - by Mike Rose
    This is a general type question that I dont know what code I could post that would help get an answer. So I apologize in advance, but if some piece of code would help, please let me know and Ill add it. The question is, how do I confirm that a pdf loaded in a web browser when using Ruby/Cucumber/Watir Webdriver? My test clicks on a random link that should load a pdf in a new browser window, so I cant check the url because it will vary with each test. Any ideas how I can make sure the correct pdf loads after clicking the link that should load it?

    Read the article

  • How can I prompt for input using Selenium/Webdriver and use the result?

    - by Tempus
    I would like to allow for user input and make some decisions based on it. If I do this: driver.execute_script("prompt('Enter smth','smth')") I get a nice prompt, but I cannot use it's value. Is there any way of showing an input box to the user, and use the value typed there? EDIT: This is my script: from selenium.webdriver import Firefox if __name__ == "__main__": driver = Firefox() driver.execute_script("window.promptResponse=prompt('Enter smth','smth')") a = driver.execute_script("var win = this.browserbot.getUserWindow(); return win.promptResponse") print "got back %s" % a And this exits with the following exception: a = driver.execute_script("var win = this.browserbot.getUserWindow(); return win.promptResponse") File "c:\python26\lib\site-packages\selenium-2.12.1-py2.6.egg\selenium\webdriver\remote\webdriver.py", line 385, in ex ecute_script {'script': script, 'args':converted_args})['value'] File "c:\python26\lib\site-packages\selenium-2.12.1-py2.6.egg\selenium\webdriver\remote\webdriver.py", line 153, in ex ecute self.error_handler.check_response(response) File "c:\python26\lib\site-packages\selenium-2.12.1-py2.6.egg\selenium\webdriver\remote\errorhandler.py", line 110, in check_response if 'message' in value: TypeError: argument of type 'NoneType' is not iterable What am I not doing right?

    Read the article

  • Selenium Webdriver (FirefoxDriver)

    - by Samareri
    Hey all, I'm using Selenium Webdriver to do some robottesting. Since some functions appear to only work in Firefox, I'm obligated to use Firefoxdriver. Now and then, something weird happens. Starting up te driver driver = new FirefoxDriver(); driver.get(URL); gets firefox to startup but not to go to the specified url. The strange thing is that it works on another computer with the same preferences set in Firefox. I solved this problem once by changing to another version of firefox, but this time this doesn't do the trick for me, it did however worked for the other developers. Yes, the error started for all developers on the same time, same day... My first question is: is it a firefox problem or Webdriver problem. Second question: how is it possible that it works on other pc's? Any help would be very appreciated Thanks Error: org.openqa.selenium.WebDriverException: Could not parse "". System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_18' Driver info: driver.version: firefox at org.openqa.selenium.firefox.Response.<init>(Response.java:53) at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.nextResponse(AbstractExtensionConnection.java:258) at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.readLoop(AbstractExtensionConnection.java:220) at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.waitForResponseFor(AbstractExtensionConnection.java:213) at org.openqa.selenium.firefox.internal.AbstractExtensionConnection.sendMessageAndWaitForResponse(AbstractExtensionConnection.java:162) at org.openqa.selenium.firefox.FirefoxDriver.executeCommand(FirefoxDriver.java:329) at org.openqa.selenium.firefox.FirefoxDriver.sendMessage(FirefoxDriver.java:312) at org.openqa.selenium.firefox.FirefoxDriver.sendMessage(FirefoxDriver.java:308) at org.openqa.selenium.firefox.FirefoxDriver.fixId(FirefoxDriver.java:350) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:130) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:109) at be.....MMCRobotTest.login(MMCRobotTest.java:98) at be.....MMCRobotTestAttribute.testNewAttribute(MMCRobotTestAttribute.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0 at org.json.JSONTokener.syntaxError(JSONTokener.java:496) at org.json.JSONObject.<init>(JSONObject.java:180) at org.json.JSONObject.<init>(JSONObject.java:403) at org.openqa.selenium.firefox.Response.<init>(Response.java:41) ... 30 more

    Read the article

  • Watir does not trigger Jquery event handler

    - by Gary
    I am testing a JQuery Web application. I have a JQuery popup that I simply cannot get the submit button to fire in Watir. The same pattern is used thought the application. I have verified the button exists and have tried click, fireEvent you name it and am out of methods to call. Has anyone solved this?

    Read the article

  • How to explicitly add a cookie in Watir?

    - by Sands
    I need to set a cookie in IE to execute some specific flow. I tried using the following code ieb = Watir::IE.new ieb.document.cookie="rememberme=foobar;Path=/; Domain=sometestdomain.com" # Bring up browser and do bunch of stuff However, I see that when the IE comes up, rememberme cookie is not set. Am I doing something wrong here?

    Read the article

  • Testing "Login" with watir

    - by user328040
    I'm starting to use watir. I need to create a test script to login in the application. The code bellow is the script from the page. I saw some examples with buttons and links, but I don't know how to "submit" the information.

    Read the article

  • Naming selenium grid nodes. Spawning a specific node

    - by ???? ????
    I'm trying to implement a kind of default queues in selenium hub. There is a possibility to specify node's name (actually its environment, smth like "firefox on ubuntu" or "chrome on windows"). Selenium grid itself has a default queue, it works according to 'First In, First Out' principle. But I want to prioritize some of my tasks given to selenium server. I have no possibility to introduce custom queue (seems like there is no API for that), that's why I decided to separate queue's logic from selenium server. I'll only call a specific node with specific name (environment) for example "firefox important node" or smth like that. So, I want to know how to directly tell selenium which node to use for my task? And generally, am I thinking in a right way? Here are my configs: hubConfig.json.erb { "host": null, "port": <%= node[:selenium][:server][:port] %>, "newSessionWaitTimeout": -1, "servlets" : [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": <%= node[:selenium][:server][:node_polling] %>, "cleanUpCycle": <%= node[:selenium][:server][:cleanup_cycle] %>, "timeout": <%= node[:selenium][:server][:timeout] %>, "browserTimeout": 0, "maxSession": <%= node[:selenium][:server][:max_session] %> } nodeConfig.json.erb { "capabilities": [ { "browserName": "firefox", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "phantomjs", "maxInstances": 5, "seleniumProtocol": "WebDriver" } ], "configuration": { "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": <%= node[:selenium][:node][:max_session] %>, "port": <%= node[:selenium][:node][:port] %>, "host": "<%= node[:fqdn] %>", "register": true, "registerCycle": <%= node[:selenium][:node][:register_cycle] %>, "hubPort": <%= node[:selenium][:server][:port] %> } } And my Driver class: ... def remote_driver @browser = Watir::Browser.new(:remote, :url => "http://myhub.com:4444/wd/hub", :http_client => client, :desired_capabilities => capabilities ) end def capabilities Selenium::WebDriver::Remote::Capabilities.send( "firefox", :javascript_enabled => true, :css_selectors_enabled => true, :takes_screenshot => true ) end def client client = Selenium::WebDriver::Remote::Http::Default.new client.timeout = 360 client end ... I still don't know how to use specified node for my task. If I try to start a driver adding :name => "firefox important node" and extend nodeConfig.json.erb's configuration with environments: - name: "firefox important node" browser: "*firefox" - name: "Firefox36 on Linux" browser: "*firefox" selenium just starts random firefox browser on a random node. How can I control it?

    Read the article

  • How to use html2canvas JavaScript with Selenium webdriver in C#

    - by PapyRef
    With selenium webdriver, I would test html2canvas JS script to take "screenshots" of webpages or parts of it, directly on the browser. I have a written this C# code to test it, but obj is always null. C# Code for reference IWebDriver Driver = new FirefoxDriver(); Driver.Navigate().GoToUrl("http://www.monsite.com"); string scriptJS = File.ReadAllText("html2canvas.js"); scriptJS += @" html2canvas(document.body, { onrendered: function(canvas) { var img = canvas.toDataURL("image/png"); return img; } });"; IJavaScriptExecutor executorJS = Driver as IJavaScriptExecutor; var obj = executorJS.ExecuteScript(scriptJS);

    Read the article

  • Returning a DOM element with Webdriver in Javascript

    - by ehmicky
    How do I return a DOM Element with Webdriver in Javascript? I am using the wd.js Javascript bindings: require("wd") .remote("promiseChain") .init() .get("http://www.google.com") .elementById("mngb") .then(function(element) { console.log(element); }); I am getting this weird object that is not a standard DOM Element (for example I cannot get the HTML code out of it): { value: '0', browser: { domain: null, _events: {}, _maxListeners: 10, configUrl: { protocol: 'http:', slashes: true, auth: null, host: '127.0.0.1:4444', port: '4444', hostname: '127.0.0.1', hash: null, search: '', query: {}, pathname: '/wd/hub', path: '/wd/hub', href: 'http://127.0.0.1:4444/wd/hub' }, sauceRestRoot: 'https://saucelabs.com/rest/v1', noAuthConfigUrl: { protocol: 'http:', slashes: true, host: '127.0.0.1:4444', port: '4444', hostname: '127.0.0.1', hash: null, search: null, query: null, pathname: '/wd/hub', path: '/wd/hub', href: 'http://127.0.0.1:4444/wd/hub' }, defaultCapabilities: { browserName: 'firefox', version: '', javascriptEnabled: true, platform: 'ANY' }, _httpConfig: { timeout: undefined, retries: 3, retryDelay: 15, baseUrl: undefined }, sampleElement: { value: 1, browser: [Circular] }, sessionID: '238c9837-3d82-4d90-9594-cefb4ba8e6b9' } }

    Read the article

  • Selecting Element followed by text with Selenium WebDriver

    - by Andrew
    I am using Selenium WebDriver and the Python bindings to automate some monotonous WordPress tasks, and it has been pretty straightforward up until this point. I am trying to select a checkbox, but the only way that I can identify it is by the text following it. Here is the relevant portion of HTML: <li id="product_cat-52"> <label class="selectit"> <input value="52" type="checkbox" name="tax_input[product_cat][]" id="in-product_cat-52"> polishpottery </label> </li> The only information that I have in my script to identify this checkbox is the string "polishpottery". Is there any way to select that checkbox knowing only the text that follows?

    Read the article

  • Checking if an element is visible in Chrome using Selenium Remote WebDriver

    - by Stuart
    Is there a cross browser solution to check if an element is visible using WebDriver? The solution for IE and firefox is to cast the object to a RenderedRemoteWebElement and then call the property Displayed. I'm using the following methods to return if a element is visible: /// <summary> /// Check if the control is visible. /// </summary> public bool IsVisible() { IWebElement control = mSelenium.FindElement(mFindBy); return ((RenderedRemoteWebElement)control).Displayed; } The problem is when I run this using Chrome, I get an exception when casting to type RenderedRemoteWebElement, this is not really the problem as I can catch this, but I need to a solution to check if an element is visible in chrome. Thanks

    Read the article

  • Watir: Need to double click on an element to open custom popup

    - by Namratha
    Hello, I am a newbie in WATIR. The problem I am facing is - The application I am testing has thumbnails (like Windows icons) placed on the page and I need to double click it. On doing that, an custom popup (ajax popup implemented in javascript) will open. The fire_event("ondblclick") is not working for me. I also tried 'click' twice but that too is not helping. Is there any other way of handling this? Your help is highly appreciated.

    Read the article

  • Watir question regarding selecting a hidden dropdown.

    - by AJ
    Hi, I have two dropdowns, the second dropdown does not show until a choice is made from the first one. Using watir, i can select the first dropdown, and when i watch it, the second one becomes active, but it cannot select it. i just tried the regular select_list using name and id. Here is the code for the second drop down. <td> <input type="hidden" value="1" name="list" id="list"> <script type="text/JavaScript" language="JavaScript"></script> <select> <option value="">1</option> <option value="2">2</option> <option value="3">3</option> </select> </td> I've also notice the value for the hidden field change as i select different options. Thanks for any help

    Read the article

  • How to detect if an element exists in Watir

    - by Rijksband
    Hi, I'm relatively new to Watir but can find no good documentation (examples) regarding how to check if an element exists. There are the API specs, of course, but these make precious little sense to me if I don't find an example. I've tried both combinations but nothing seems to work... if browser.image (:src "/media/images/icons/reviewertools/editreview.jpg").exists then... if browser.image (:src "/media/images/icons/reviewertools/editreview.jpg").exists? then... If anyone has a concrete suggestion as per how to implement this, please help! Thanks!

    Read the article

  • How to get an element using inner text (Watir, Nokogir, Hpricot)

    - by Hpriguy
    I have been expeirmenting with Watir, Nokogir and Hpricot. All of these use top-down approach which is my problem. i.e. they use element type to search element. I want to find out the element using the text without knowing element type. e.g. <element1> <element2> Text2 </element2> <element3> Text3 </element3> text4 </element1> I want is to get element2 and element1 etc by searching for Text2 and Text3. Please note that I do not know if elements are divs or tr/tds or links etc. I just know the text. Algorithem should be something like : iterated through all the elements, match inner text, if match get me the element and the parent element. Let me kow if this is possible in any way?

    Read the article

  • Selenium Webdriver Java - looking for alternatives for Actions and Robot when performing drag-and-drop

    - by Ja-ke Alconcel
    I first tried Actions class and the drag-and-drop does work on different elements, however it was unable to locate the a specific draggable element on it's exact screen/webpage position. Here's the code I've used: Point loc = driver.findElement(By.id("thiselement")).getLocation(); System.out.println(loc); WebElement drag = driver.findElement(By.id("thiselement")); Actions test = new Actions(driver); test.dragAndDropBy(drag, 0, 60).build().perform(); I checked the element with it's pixel location and it prints (837, -52), which was somewhere on top of the webpage and was pixels away from the actual element. Then I tried using the Robot class and works perfectly fine on my script, but can only provide constant successful runs on a single test machine, running it with a different machine with different screen resolution and screen size will render the script to fail due to the dependency of Robot on the pixel location of the element. The sample code of the Robot script I'm using: Robot dragAndDrop = new Robot(); dragAndDrop.mouseMove(945, 166); //actual pixel location of the draggable element dragAndDrop.mousePress(InputEvent.BUTTON1_MASK); sleep(3000); dragAndDrop.mouseMove(945, 226); dragAndDrop.mouseRelease(InputEvent.BUTTON1_MASK); sleep(3000); Is there any alternative for Actions and Robot to automate drag-and-drop? Or maybe a help on working the script to work on Actions as I really can't use Robot. Thanks in advance.

    Read the article

  • Get the Dynamic table data from gui in selenium webDriver

    - by Rabindra
    I am working on a web based Application that I am testing with Selenium. On one page the content is dynamically loaded in table. I want to get the Table data, i am geting a "org.openqa.selenium.NullPointerElementException" in this line. WebElement table = log.driver.findElement(By.xpath(tableXpath)); I tried the following complete code. public int selectfromtable(String tableXpath, String CompareValue, int columnnumber) throws Exception { WebElement table = log.driver.findElement(By.xpath(tableXpath)); List<WebElement> rows = table.findElements(By.tagName("tr")); int flag = 0; for (WebElement row : rows) { List<WebElement> cells = row.findElements(By.tagName("td")); if (!cells.isEmpty() && cells.get(columnnumber).getText().equals(CompareValue)) { flag = 1; Thread.sleep(1000); break; } else { Thread.sleep(2000); flag = 0; } } return flag; } I am calling the above method like String tableXpath = ".//*[@id='event_list']/form/div[1]/table/tbody/tr/td/div/table"; selectfromtable(tableXpath, eventType, 3); my html page is like <table width="100%"> <tbody style="overflow: auto; background-color: #FFFFFF"> <tr class="trOdd"> <td width="2%" align="center"> <td width="20%" align="center"> Account </td> <td width="20%" align="center"> Enter Collection </td> <td width="20%" align="center"> <td width="20%" align="center"> 10 </td> <td width="20%" align="center"> 1 </td> </tr> </tbody> <tbody style="overflow: auto; background-color: #FFFFFF"> <tr class="trEven"> <td width="2%" align="center"> <td width="20%" align="center"> Account </td> <td width="20%" align="center"> Resolved From Collection </td> <td width="20%" align="center"> <td width="20%" align="center"> 10 </td> <td width="20%" align="center"> 1 </td> </tr> </tbody> </table>

    Read the article

  • Watir vs Selenium vs Sahi

    - by Dennis
    Out of these 3, which have you or has your company chosen to work with? Pros & Cons please. I'll be comparing them myself as well, but I'd like to hear what others have to say. Also, please state which you have all tried (so that I know you have a good comparison of the 3).

    Read the article

  • How to upload a file with watir and IE?

    - by karlthorwald
    I am writing a watir script to test an upload form. But the script does not automatically choose the file that is to be uploaded from my harddrive. Instead IE stops with the file chooser dialog open. As soon as I manually select the to be uploaded file in the dialog and click ok, watir continues as desired. I wonder why it stops. This is from my watir script: ie.file_field(:name, 'upload').set("s:\\localwatir\\Test_Pdf.pdf") ie.button(:name, 'submit').click I got the code from this page: http://wiki.openqa.org/display/WTR/File+Uploads This is the form: <form name="form1" enctype="multipart/form-data" method="post" action="uploadlegacy.php"> <input type="file" name="upload" size="30"> <input type="submit" name="submit" value="upload"> </form> I have found this manual http://svn.openqa.org/svn/watir/trunk/watir/unittests/filefield_test.rb also, but as I do not know what $htmlRoot stands for, I cannot really follow it. Does that mean, I have to put some "file///" into the parameter for set()? If so, how exactly? I am using IE 6 for the testing.

    Read the article

  • How do I route watir through a proxy pragmatically?

    - by feydr
    I'm trying to route watir through a proxy pragmatically -- this means within the script I'd like to change my proxy dynamically before launching the browser. Here's what I've tried so far (and so far am failing): I'm running chrome and lucid lynx ubuntu. I chose TREX cause I thought watir might be making use of PROXY or something. I rewrote /usr/bin/google-chrome as: #!/bin/bash /opt/google/chrome/chrome --proxy-server="$TREX" $@ The reason I'm passing in the environment variable to proxy-server rather than http_proxy is because I never could get http_proxy to work as is anyways then I did a simple: require 'rubygems' require 'watir-webdriver' ENV['TREX'] = "XX.XX.XX.XX:YY" browser = Watir::Browser.new(:chrome) browser.goto("http://mysite.com") Anyways, what is happening here is that it is forwarding me to the login page of the proxy rather than just forwarding the request. What am I missing here? I feel like I'm pretty close.

    Read the article

  • Watir question regarding table rows and loop

    - by AJ
    Hi, I would like to go through a table and look for a word, if that word appears, i would like to click on a radio button in the same row, but not the same column, then stop the loop. I have something like this at the moment but i dont know where to go on from here. @ie.div(:class, 'tableclass').table(:index, 1).each do | row | row.each do | cell | if (cell.text() == 'text') ##Set radio button break end end end I tried selecting a radio by name and index, but i do not know how to get the row number that it is currently at. Thanks.

    Read the article

  • Watir question regarding select_list and reloading

    - by AJ
    I have a drop down with multiple options. Whenever you choose an option, the page reloads with data specific with that option. Currently I'm using select.list(:name, strg).set(value) and it does that part just fine, but it does not reload the page with the specific data. Anyone know how to help. When i watch it in action, it doesn't select the option either, but my logs show that it does.Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >