Tag Info

New answers tagged

0

I would recommend you to move your Selenium version and drivers for your other browsers (IE,Chrome) to the latest version. So far 2.44. Verify Selenium and drivers from browsers are same version and also check according to your US (32 bits, 64 bits)


0

You can identify element using XPATH by utilizing display text as below: driver.findElement(By.xpath("//div[text()='Update Profile Picture']")).click();


1

You need to tell it to return the value. Change this line: String mainURL = (String) js.executeScript("productObj.mainURL"); to: String mainURL = (String) js.executeScript("return productObj.mainURL");


0

As Twaldigas said, use contains in an xpath query to find all elements with 'selectedDetailsRadio' in the input id, then iterate through the results. You can analyze the numbers in the id either using string indices or regex.


1

Use xpath. I don't know what language you're using, but in Python it would be: driver.find_elements_by_xpath('//div[@class="item"]')


1

You can use the "not" pseudo-class in a CSS selector like this: div.item:not(.sold-out)


2

you can pass the driver as argument to the methods , so no need to re create them.


0

We use fancybox on our site, and it is usually inside of an iFrame (at least with our implementation). In order to find and interact with elements inside an iFrame, you have to switch your driver to the frame first. Here's a simple implementation in c#. var iframe = driver.FindElement(By.CssSelector("youriframeselector"); driver.SwitchTo().Frame(iframe); ...


0

GMail has official JAVA API. Here is your bag: https://developers.google.com/gmail/api/quickstart/quickstart-java


0

First thing to check is for duplicate elements on the page. Debug your code and ensure that: driver.findElements(By.className("fancybox-item fancybox-close")).size() evaluates to 1 Often times, if Selenium doesn't complain when you do a .click() but the action you expect doesn't happen, you'll find that there is more than one element matching your Find.By ...


0

I just replaced our Gmail-based tests with a tool called Inbucket (http://www.inbucket.org/) and just query its REST API to check the email contents. It works pretty well so far. If you use c#, it's pretty simple to create a small class to query the API using RestSharp.


2

Seems that you want to have a tool which can translate requirements/test cases (written by business people with no experience in programming) into executable code. In our practice FitNesse is not that tool. We started with FitNesse, and keep maintaining existing tests and even adding new when feasible, but these tests are written by developers, not business ...


0

Ok, I found documentation for Appium that shows how to automate Chrome. Here is the link to the documentation. And here are the desired capabilities to send when you're starting the session: DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android"); ...


0

You can get list of all elements say by type, then loop over them, check the ID, and by some custom rules decide which one to pick. You have quite a mess on your hands, but do what you can.


0

After you driver.get(URL) to your page, you can execute javascript in it from webdriver, like this driver.get('javascript:<your JS snippet here>') so try driver.get('javascript:localStorage.clear();')


0

This scenario works with maven-surefire-plugin 2.16 or higher, JUnit 4.7 or higher. The Parameterized runner is a suite and therefore every single configuration means a new class. In your configuration of maven-surefire-plugin you should use parallel=classes and certain threadCount. You have many possibilities like classesAndMethods or threadCount + ...


0

Someone develop a webdriverjs-helper: https://github.com/surevine/webdriverjs-helper This helper provide a function to get the values of a dropdown: browser.dropdownlist(selector).value(valueHandler) https://github.com/surevine/webdriverjs-helper#browserdropdownlistselectorvaluesvalueshandler


0

//create a list/array of the partner codes found within the source file List<MindsparkPartnerCode> records = new ArrayList<MindsparkPartnerCode>(); //set the location of the file and create a read buffer FileReader r = new FileReader("C:\\DailyLocalGuidePartnerCode.csv"); BufferedReader bfr = new ...


0

line contains nothing but commas. That causes line.split to return a zero-length array. Since the array is empty, chunks[0] causes an ArrayOutOfBoundsException.


2

You can use WebDriverWait to synch with page load. Something like the following might help WebDriverWait wait = new WebDriverWait(driver, 15); //you can play with the time integer to wait for longer than 15 seconds.` wait.until(ExpectedConditions.titleContains("title")); //if you want to wait for a particular title to show up OR ...


0

I have tested an ExtJS application. Most of the page element attributes are dynamic. They change not only when you add a new user or something, they change every time when you open the application. I have found the xpath expressions I get from the tools (Firebug etc.) is not very useful. Here is why: hard to read break easily hard to debug What I do ...


0

Back end testing is as important as front end testing. We had performed database testing with TestingWhiz tool. Please take a look at this webinar video that we conducted on automated database testing - Webinar Video. You can also learn more on database testing with the articles in learn more section.


0

You have the following options: driver.findElement(By.className="k-button").click(); // Do not work if you have several HTML elements with the k-button CSS class on the same page driver.findElement(By.xpath("//input[@onclick='Post();']")).click; //Do not work if you have several HTML elements with this onlick action on the same page ...


0

We can use something like By.xpath("//td[contains(text(),'youruser')]") //here user text is case sensitive By.xpath("//td[contains(lower-case(text()),'youruser')]") //to handle case sensitivity. Here user is not case sensitive


0

there will be 2 reasons : 1 - May be it is trying to click the button before page loads completly in this case you should use wait() 2 - may be that button is located in iframe in this case u need to move to iframe and then click on button


3

You should be splitting the xpath to fetch individual tables for clarity sake. I suggest the following: // Get the content or container WebElement content = driver.findElement(By.id("contentText")); //Get the table of users WebElement tblUsers = content.findElement(By.xpath(".//table/tbody/tr[2]/td/table/tbody/tr/td[1]/table")); // Get the rows which ...



Top 50 recent answers are included