Tag Info

Hot answers tagged

7

I'm going with my favorite response here: it depends. Sometimes the decision is made because that's the language the tool supports. Sometimes the language is a flavor of the language used by the development team - this often happens where there's an expectation that the development team will be writing at least some of the test automation code. Sometimes ...


3

There are times when using the Page Object Pattern makes a lot of sense and times where it doesn't make as much sense. If you have a web application where it is basically one single dynamic page then it makes less sense, however you can still use "page" objects that are really more like "section" objects for common pieces, for example if you have a Left ...


2

I wonder if it would be faster to use Xpaths to search specifically for cells in the row of interest, rather than fetching all rows and then manipulating the one row you are interested in. I am not fluent in Python, so I will illustrate my suggestion in pseudo-code: for i in 1..51 condition_xpath = "//table/tr[" + i + "]/td[1]" column1 = ...


2

Similar to Will's answer, but finds the <select> by its element name, and clicks based on the <option> text. from selenium import webdriver b = webdriver.Firefox() b.find_element_by_xpath("//select[@name='element_name']/option[text()='option_text']").click()


2

Use XPATH. Install a tool like FirePath to help yourself debug this, but you'll probably want something like: select_finder = "//tr[contains(text(), 'Mahmoud')]//a" driver.find_element_by_xpath(select_finder).click() where the XPATH reads something like "find a table row which contains the text "Mahmoud", then find a hyperlink inside that row"


1

Given that you're primary Linux and prefer OSS, have you tried solutions such as soap/loadUI or JMeter. I know that there's some features of soapUI that require a professional license, but, it is reasonable for most companies. One of the features with this that I believe would suit you well would be the ability to call specific tests/suites from command ...


1

Visual Studio's load testing can do what you are asking. It requires a license for Visual Studio Ultimate. Even though it is geared towards web testing, it can actually execute any unit test as well. The way it works is you create a LoadTest and that LoadTest can execute any number of scenarios and each scenario can execute any number of tests. At the ...


1

One answer to your question is to look at this site which measures popularity of programming languages: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html You will see that both Java and C# top Python in that list and all 3 of these languages are popular in the QA community. Note that this does not speak to how popular these languages are in ...


1

In general I agree with Steve that the language of the test code match the language of the product code. The reason for this is to avoid artificial translation layers between the test code and the product code. However, this is not always possible or feasible. But, I would not recommend choosing a language because it might be popular, or that you think it ...


1

You should pick up the same language your development team is using. It fosters better communcation and collaboration in teams. It also gives the added benefit for testers stuck on a issue to use the knowledge within thier development community and developers have the ability to write tests (sweet!). To be honest, you are always going to have execeptions ...


1

If you aspire to upskill people who may not be full time developers, it may not be enough to target a single language, no matter how popular it is. A full time developer worth their salt should be able to translate any popular language to their own favorite language, but someone with less development experience may need more help getting started. If it ...


1

I haven't used the Python bindings, but as far as I know they should be equivalent to the Java ones. If I were you I would try to find the Python equivalents of findElements() and isDisplayed() that are available in the Java bindings. For example, I would do something similar to this: // ... myElementList = driver.findElements(By.Id("fancybox-close")) if ...


1

Yes, there is another way. I call it “workarounds” Ingredients: 1. In the separate file, define all bug numbers as contestants cont int BUG_48484 = 48484 cont int BUG_5555 = 5555 2. Create a dictionary/hash with bug names and descriptions MyBugList = ( *# Commented: BUG_48484 => “Application crashes”,* BUG_5555 => “The Large Hadron Collider ...


1

I wrote a javascript snippet as follows after reading replies from the webdriver google group: wd.execute_script("document.getElementById('allImages').value = '../uploads/b31f8a31-9d4e-49a6-b613-fb902de6a823.jpg';") Answer from the webdriver google group: Using the "execute_script" method is the recommended approach in this case. No, none in ...


1

I am not yet familiar with the python syntax, but this is what you can do: Return all elements with the given xpath: self.browser.find_elements_by_xpath("//input[@name='arr[]']") Note that it is find_elements_by_xpath (plural) Loop through the list to check all checkbox


1

Does this help ? (ops, after the trouble, I realized your issue is with Chrome) but this is working fine on Firefox 9.0.1 on Windows 7 String configFile = "/apps/configs/logins.cfg"; // server, port, userid, password defaults String userid = "willey@customer.com"; String password = "willeyCoy0tt3"; String server = ...


1

squish 4.2 using Qt will record my menu bar interactions, so you may have already done this by now but you can try the latest squish. A problem that I have is bringing the focus back to the AUT once I run the test so that I can test menu bar functionality. Squish hooks into Qt just fine but the problem is the application does not actually have focus when you ...


1

The Actions API has worked fine for me in Firefox . However, mouseover doesn't quiet work in other browsers including IE. This is a known issue. http://code.google.com/p/selenium/issues/detail?id=2067 I use java and have done hovers succesfully in Firefox using the code that's similar to Frank's. In addition to Frank's code, I disable the native events and ...


1

I have run into this problem multiple times, people love their dynamic rollout menus. The best way I've found to handle these (this is in java) is by using jQuery (If it's enabled on the site you are testing). Just google jQuery and find some tutorials on adding CSS to an element. Then I used Chrome to work out a jQuery line that added the correct styles ...


1

I had similar problem. Can you navigate from one menu to its submenu using keyboard arrows? If you have that option: Firefox driver = new FirefoxDriver(); (...) By locator = By.xpath("..."); Locatable hoverItem = (Locatable) driver.findElement(locator); Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseMove(hoverItem.getCoordinates()); ...


1

Did you try using selenose? (this is the online document) I think this library might be the one fit you. It has something like this in setup.cfg: [nosetests] with-selenium-driver = true selenium-driver = firefox [selenium-driver:firefox] webdriver = firefox [selenium-driver:chrome] webdriver = chrome so, you can use ...



Only top voted, non community-wiki answers of a minimum length are eligible