New answers tagged

1

To work around element not found errors (when you are sure element should be found) you should add waits for element before you actually click on it. But if you do it like this: Wait element to be visible Wait element to be clickable Find and Click element etc It will be ugly. So for example you could do something like this : void Wait(Element) { ...


1

Q.1 Sometimes "click_button" or "choose" (for radio buttons) does not work. Even when an ID/name is clearly shown in the HTML & it'll throw an element not found? Ans - One basic mistaken we might can do is - if we have seen element on page means that will be identified by program/code too. Don't believe only on eyes, Good if we right code considering ...


0

You can try sending the credentials in the "Authorization" header using a special URL format like this: [protocol][user:password]@[domain_name] You can copy your homepage url and insert user:password@ after the // For example: https://user:password@www.example.com


0

@Rajesh, Below solution works for me: var myDropdownOption = driver.findElements(By.name("industrySector-sector")).Where(x => x.GetProperty("value").ToString().Contains("Computer Software")).First();* myDropdownOption.click; Give a try !


0

You could simply just add the opt-out cookie to the browser. This answer may help.


0

This works for me: Set <String> handles =driver.getWindowHandles(); Iterator<String> it = handles.iterator(); String parent = it.next(); String child = it.next(); driver.switchTo().window(child); //perform actions on child window //perform actions on child window driver.close(); // only for child wondow ...


0

Update Firefox to 47.0.1 and Selenium Java client to 2.53.1


0

Your element is not visible. Thats the reason Selenium couldn't able to click on it. Are you sure the element is visible? According to Selenium an element is visible if: visibility != hidden display != none (is also checked against every parent element) opacity != 0 (this is not checked for clicking an element) height and width are both > 0 for an input, ...


0

As of v2.51.0, the firefox driver supports Firefox 44, so without posting any code that's about all I can help you with. Source


0

Yes. You can execute Javascript like so. Of course, implementation may vary depending on the language you're using. WebDriver driver = new AnyDriverYouWant(); if (driver instanceof JavascriptExecutor) { ((JavascriptExecutor)driver).executeScript("yourScript();"); } else { throw new IllegalStateException("This driver does not support JavaScript!"); } ...


0

A new window is basically a new webpage that opens in a separate window or a tab depending on your browser settings. Since you have asked for examples, here it is e.g. visit appium tutorial webpage. Click on any chapter say chapter 1. It will take you to new window/tab. An alert box or pop up window is often used if you want to make sure information ...



Top 50 recent answers are included