Tag Info

New answers tagged

0

Here's how I'm doing it in VB with FirefoxDriver. I created a wrapper for the webdrivers, but without a wrapper it looks something like this. IWebDriver has two handle controls; CurrentWindowHandle and a collection of WindowHandles. The handles in WindowHandles are in the order in which they were created, so getting the last handle in the list gets the ...


0

There is also the long option which uses selenium's element displayed functionality. W3C specifications for element displayed Python example: from selenium import webdriver b = webdriver.Chome() b.get('https://google.com') els = b.find_elements_by_css_selector('*') hidden_els = [el for el in els if not el.is_displayed()] print(hidden_els) b.quit()


0

Process.Start("cmd.exe", "/C java -jar selenium-server-standalone-2.47.1.jar -role hub"); You didn't specify any port for the hub. Then the default hub -port is port 4444. I'm wondering why you were trying to connect "http://100.100.10.100:5555/wd/hub" instead of "http://100.100.10.100:4444/wd/hub" ?


1

This mentions this remedy for this error : If you are using the RemoteWebDriver and you get the The path to the chromedriver executable must be set by the webdriver.chrome.driver system property error message you likely need to check that one of these conditions is met: The chromedriver binary is in the system path, or The Selenium Server was ...


0

I like to use below format to avoid quotes errors WebElement element= driver.findElement(By.xpath("//div[@class='btnContr']/input[@value='Cancel']")); JavascriptExecutor executor = (JavascriptExecutor) driver; executor.executeScript("arguments[0].click();", element); Hope it will help you :)


0

Splinter does not support find_by_class_name. Splinter has support for find_by_option_by_text and find_option_by_value but it does not look like you have the option tag in the html. Try using find_by_css instead for the list elements. This code snippet assumes your list items are visible: browser.find_by_css('.option1') If they are invisible, you will ...


0

If test is running successfully on other browser then there is configuration issue of IE on machine. Make sure version of Selenium, IE driver and IE browser are compatible Ref. selenium release log Also verify required configure mentioned here


0

The issue is with the IE versions, your machine should be having both IE versions i.e. 32-bit and 64-bit and when you start the 'IEDriverServer.exe' it calls the 64-bit IE version while you are using 32-bit IEDriverServer.exe. I faced this issue too and observed that when any tool starts IE then 64-bit IE is launched by default (I was on Windows 7 and IE-9), ...


0

Page objects can be flexible and should reflect the way you write and maintain your tests. For myself, I typically keep my page objects as compact and stateless as possible. If your pages have a lot of re-usable components, you can put those into smaller classes that encapsulate that functionality independently, then you can use composition to integrate ...


0

Why don't you use c# code itself ? Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace olNameSpace = oApp.GetNamespace("mapi"); Outlook.MAPIFolder oInbox = olNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox); Outlook.Items oItems = oInbox.Items; ...


1

Slightly different approach, this worked for me @AfterMethod public void writeResult(ITestResult result) { try { if(result.getStatus() == ITestResult.SUCCESS) { //Do your excel writing stuff here } else if(result.getStatus() == ITestResult.FAILURE) { ...


1

If you can alter your approach to include a configuration method using @AfterMethod, then you can pass in a paramater for ITestResult, which holds the results for the most recently completed test method. That class has a method called getStatus() that will give you the status of that test. Here's an example of how to use this: @AfterMethod public void ...


0

Depending on how many more similar elements you have on the page, an xpath like the following may do what you need: //input[@type='text'][contains(@class,'form-control')][contains(@name,'projectsurvey')]


0

For Working on Selenium WebDriver with Java , you can focus on below Java concept and other related stuff, I am just giving you bigger picture. Java Basics (oops concept & programming concept) Java Collection Framework Java FileOperations (using apache POI or Jexcel) , ExceptionHandling , logger would be plus point. Junit or TestNG to start with unit ...


0

The level of Java knowledge depends on what you want to do with Selenium. You may just want to write some simple test automation scripts in which case basic Java knowledge is sufficient. If you want to make your test automation code re-usable, then object oriented programming concepts are important. If you want to create a framework, then learn advanced ...


0

It looks like only a new modal dialog is open, not a window. So you should query the modal dialog and then its inside elements to get control.


0

I had more complicated situation, even 'contains' was not enough. I got list of all elements of type (find by TAG_NAME), then looped over the list to find elements of interest by parts of id and class name. I had even to find matching pairs of elements with parts of name generated dynamically. Because of flexible list processing in Python, it was not too ...


0

You can use 'contains' : //input[contains(@name, 'projectsurvey[143') and contains(@name, 'choosekey][143')]



Top 50 recent answers are included