New answers tagged

0

Using Selenium type of testing can be done are: Functional Testing Regression Testing Sanity Testing Smoke Testing Responsive Testing Cross Browser Testing UI testing (black box) Integration Testing You can automate : WAB, WAP, APP (Mobile App) applications using selenium. Yes, Selenium can be used for UI testing. Selenium can be used to automate the ...


0

One of the main benefits to running Selenium Grid is you can run lots of parallel tests and in different combinations of environments. Even if you run only one browser + operating system you might still benefit from the fact these are hermetic systems, isolated from each other. Therefore one browser failure won't cause the other tests to fail. Although, ...


1

Something along the lines of the following code should give what you desire. Do this after instantiating your driver but before finding the elements (In the SetUp methods preferably). driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);


0

You should use one of test framework. If you use Java I recommend to use TestNG. Then you can use assertion (e.g. Assert.assertTrue(yourCondition, message) for all fields, it depends on test case and your goal. Note that if any assertion is failed then test execution is finished. If you want to prepare test cases with different login data you can use ...


0

Selenium is a good tool for UI testing wherein you need to automate the GUI functionalities. It makes sense to use it if you want to automate your regression test cases that you don't want to do manually every time a new fix has been received or a new feature has been deployed. You should definitely try other options if you want to test the APIs without any ...


2

Selenium is a system for operating a web browser by remote control. You can cause the browser to perform actions, and you can retrieve information in the DOM using different criteria. Selenium is not a system for installing software, managing tests, or managing test data.


1

One non-selenium tool we use (we use the paid version) is GhostInspector which has several options for screenshots including comparing by % difference and by css selectors to target areas.


-1

Selenium supports the following types of testing: Functional Testing Regression Testing


0

One option for verifying images is to use Applitools + Selenium. It seems to be gaining in popularity among the Selenium crowd as it's not just able to do image comparison but also do layout comparisons. I haven't used it myself but it's on my TODO list. From the looks of it, they have a decent tutorial where you can choose your environment (Selenium) and ...


0

At this situation We have lots of options- Option 1 : Look for any other attribute which Is not changing every time In that div node like name, class etc. So If this div node has class attribute then we can write xpath as bellow. //div[@class='post-body entry-content']/div[1]/form[1]/input[1] Option 2 : We can use absolute xpath(full xpath) where you ...


1

I think you should continue with your script using Selenium for existing functionality. Once your all sites development work is completed, I mean once your all modules are ready then It's easy to move Selenium script in to Cucumber script. So my opinion you should continue scripting with as usual Selenium for existing functionality, because It's easy to ...


0

You should use xpath. If your text 'IPS' is the text inside tag use this: //*[contains(.,'IPS')]. If 'IPS' is for example part of @class atrribute use this: //*[contains(@class,'IPS')]. If 'IPS' is always at the begginig of the text you can use starts-with command instead of contains. Unfortunately web browsers dont support Xpath 2.0 which provides ...


0

Use contains() or starts-with() function in xpah : Solution : With contains : //*[contains(@id,'IPS')] With starts-with : //*[starts-with(@id,'IPS')] Where * means any element. Let me know If any query.


1

Use Sikulix API. Sikuli is a library that will help you compare two images or recognize images when they are displayed on your screen. After the said image is displayed, you can click on the recognized image. Download Link: http://www.sikulix.com/ Go for the download link: https://launchpad.net/sikuli/sikulix/1.1.0 Download sikulix-setup-1.1.0.jar Run ...


2

I would go with rspec using capybara as effectively the next 'layer' down. Your existing experience should make it relatively easy. Make sure your UI tests are backed with a reasonable amount of model and controller tests. How much and what to test vary from place depending on what your built, your adherence to a rest model, etc. Try to put logic in models ...


0

Try using the locator of the check box with keyword click element instead of Select checkbox. Click Element | xpath=(//input[@type='checkbox'])[3]


2

Selenium is a software library to locate elements on web page and interact with them. To deal with images, you need to use different library. Selenium can provide screenshots (images) but you need to use something else to work with such images. As a programmer, you need to master more than a single library, and learn to use right tool for the job.


1

You can calculate hash of images and then compare the hashes for equality. SO has a question on calculating hash


0

Check this code might work import java.awt.image.BufferedImage; import java.awt.image.DataBuffer; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.imageio.ImageIO; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import ...


2

Use contains() or starts-with() function in xpah : Solution : With contains : //div[contains(@id,'post-body')]/div[1]/form[1]/input[1] With starts-with : //div[starts-with(@id,'post-body')]/div[1]/form[1]/input[1] Let me know If any query.


1

form.form-horizontal > div:nth-child(3) > div > input I suggest spending 20 minutes here


0

You can also select dropdown option by value WebElement userContractType = driver.findElement(By.xpath("//select[@id='user_contract_type_of_contract']")); Select selectValue = new Select(userContractType); selectValue.selectByValue("775");


2

Use Select method in WebDriver- WebElement contractType = driver.findElement(By.xpath("//select[@id='user_contract_type_of_contract']")); Select dropdownField = new Select(contractType); dropdownField.selectByVisibleText("Contract onbepaalde duur"); OR // Select by using index starting from 0 to ...you have to select 2nd option so take as index-1 ...


0

Why not Both (Or well, all three)? So, you create a clickMale, clickFemale and clear function. You can have a function that takes in a boolean that will click male or female based on the value of that boolean using the functions that were created.


0

Do you use explicit or implicit wait? Converting my tests to 100% explicit waits eliminated flakiness like you describe. See also http://stackoverflow.com/questions/15164742/combining-implicit-wait-and-explicit-wait-together-results-in-unexpected-wait-ti by Jim Evans, member of the Selenium team


0

If you want to click on Login button -then Simply you have to take xpath of login button & click on that- WebElement loginBtn = driver.findElement(By.xpath("//button[@class='btn btn-primary']")); OR WebElement loginBtn = driver.findElement(By.xpath("//button[@type='button']")); loginBtn.click();


0

Try using the following code: JavascriptExecutor executor = (JavascriptExecutor) driver; executor.executeScript("memberLogin();");


0

If you are using Selenium v-2.53 downgrade your Mozilla Firefox version. Selenium v-2.53 has lots of issues with Mozilla Firefox version above 45. So you may use FF v-31.0. Even I have got same issue with this version & It was resolved with Selenium v-2.52 & FF V-31.0


2

That's a connection issue between Selenium and Firefox. There is an open bug on it here that has some information for potential a work-around. The issue, from what I have been able to tell is Firefox 45+ is having issues with Multithreading on a single node from Selenium. Potential fix, untested by me and from the bug report linked above, would be to ...


0

Yes you can run the jsp page in all nodes because that jsp page is deployed to server so from any system you can access that jsp page.There is no connection with selenium grid here.Even your hub and tomcat server need not to be in same machine.


1

I found a solution that requires no browser profile with a client certificate preconfigured but rather test must provide the certificate. The downside is that it is based on PhantomJS Web browser implementation, not on Firefox or Chrome. You just need to install version 2.1.1 version or later. A client certificate can be provided with the following ...


0

Check with different xpath & use implicitly wait instead of 'Thread.sleep' -See below driver.switchTo().frame(driver.findElement(By.id("frmmenusuperior"))); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); WebElement menu = driver.findElement(By.xpath("//li[@id='i_ACAD']/a")); Actions actions = new Actions(driver); ...


0

To get all the TextViews from a list you can do something like this: List<AndroidElement> textViews = ad.findElementsByClassName("android.widget.TextView"); for (WebElement textView : textViews) { return textView.getText(); }


3

I find MITM proxies and Mocks/Stubbing to be the most advanced pieces of Technology in Automated Checking. By using these, it makes it far easier to: Create repeatable, consistent checks Decrease overall execution speed Segregate the application into logical pieces Record executed manual tests But for the real answer, QA's knowledge and senses is the ...


2

The most recent developments that I have observed are: Running tests in the cloud. Companies like Sauce Labs and Browserstack are leaders here. There are many advantages to this, from the number of devices being tested to the number of parallels servers that can be used. Writing UI tests using UI tools. Products such as Ghostinspector, heliumhq and ...


0

Since I don't know what language you're using, I'm going to assume Java. These ideas should be language independent, though. Selenium cannot do this. What you're describing is either the job of a proxy server, or the job of an http library. When you encounter situations like this, it isn't uncommon to introduce additional libraries to use alongside ...


2

multiCapabilities: [ {'browserName': 'internet explorer'}, {'browserName': 'chrome'} ], maxSessions: 1,


0

If you are using java take a look at Jayway's rest-assured. I have a quick (well for me) start project here. Look for tags @rest or @api. If you are using Ruby then HTTParty is a very simple way to accomplish the same. I have a local project (using Strongloop to generate a local test target) but I haven't pushed it yet. There are many alternatives in the ...


3

You should consider other tools to test it as Selenium is browser automation framework and you seem to be talking about REST API. Selenium limitations are: You don't have control of HTTP Headers, you will need at least Content-Type It will be tricky to send non-GET requests (POST, PUT, DELETE, etc.) So the options are in: Use underlying Selenium ...


0

You may try with javascriptexecutor- Check below code- driver.switchTo().frame("WallItemItemDetail_ifr"); Thread.sleep(2000); // select the editor nad do the input WebElement TextBox = driver.findElement(By.id("tinymce")); String input= "editor done"; TextBox.getAttribute("name"); JavascriptExecutor jst= (JavascriptExecutor) driver; ...


0

The button that's not working is missing the closing dash in the span tag - is that a copy and paste issue, or have you lifted it straight from your script? For example: <-span class="icon-disk gb-icon gb-search-icon" title="Save view" ng-click="showSaveFilterModal()"><-/span> versus: <-span class="icon-disk gb-icon gb-search-icon" title="Save ...


0

I would try selecting the element and dump its text instead of clicking it, to see if it's a matter of selection or event activation. Two other possible problems could be: a race condition where this DOM is not rendered yet when you select (although usually there are implicit waits preventing this in place) the element not being displayed, as WebDriver ...


0

Here is an example from the tests of the project of how to use this method: public function testElementsKnowTheirTagName() { $this->url('html/test_element_selection.html'); $element = $this->byClassName('theDivClass'); $this->assertEquals('div', $element->name()); }


1

Selenium does not have the capability to automate the desktop applications.It cannot recognize the objects in a desktop application. Selenium drives the testing using the driver object that identifies the elements on screen using id, cssselector, xpath etc. which are not present in a desktop app. Though there is ID behind the elements in a desktop app but as ...


0

From the error it looks like selenium is still searching for elements on the old window. Please make sure that line driver.switchTo().window(ar.get(ar.size()-1)); is actually switching to new window.


0

My robot tests broke completely when updating firefox from 44.0.2 to 45.0.2. With selenium server 2.49.0 FF 44.0.2 still works fine. Latest version of selenium-server 2.53.0 also does not work with my robot tests. Although I think it's down to the Selenium2Library needing an update...


1

I don't think you need anyone's permission to shift to SAP testing, but in case you feel you needed one, you have my permission :-) Regarding if someone will hire you, it depends on your skills and their need, no one here can answer that.


0

public class Selenium_Grid { WebDriver driver; String baseUrl, nodeUrl; @BeforeTest public void setUp() throws MalformedURLException { baseUrl = "www.fb.com/"; nodeUrl = "http://192.168.1.57:6666(port_n0)/wd/hub"; DesiredCapabilities capibility = DesiredCapabilities.safari(); ...


0

You are using Select class to manipulate an ul element (unordered list) and it will fail, as Select class was designed to cater select (i.e dropdowns) elements only. Now to solve your problem statement, say I have to select Kochi(COK) from the list, follow the below steps : Do a sendkeys. ...


1

It looks like the different C# browser drivers all extend RemoteDriver and end up sending the find elements commands over HTTP using the WebDriver protocol. Therefore, the actual finding of elements within the DOM does not take place in the C# driver code. Instead, it's ultimately up to the browsers themselves to provide responses to these commands. For ...



Top 50 recent answers are included