Kenil Fadia
  • Member for 6 years, 2 months
  • Last seen more than a month ago
  • Mumbai, India
Locate Elements through Shadow DOM in Chrome Selenium?
2 votes

When we try to find Shadow DOM elements using selenium locators, it will throw 'NoSuchElementException'. To access these Shadow DOM elements, we need to use JavascriptExecutor executeScript() function....

View answer
Why doesn't my XPath find my element on the page?
1 votes

Why [4]? Shouldn't it be: string xpath = "//article[@class='shared__reader__xx reader__container__content'][1]/div[@class='chapter xx'][1]";

View answer
Selenium Mac Salesforce
1 votes

I see a google chrome notification there. You need to first handle/disable that notification first. To do that, you can use the following code snippet when initializing a browser import org.openqa....

View answer
How to interact with the radio button if isDisplayed, isEnables are false
1 votes

//div[@class ='radio']/following-sibling::div/label/input Above locator used in your script will locate 2 radio buttons, You can use the following locators to uniquely select refund/replace: refund: ...

View answer
Unable to Run Tests on Edge browser in Jenkins
Accepted answer
1 votes

EDge does not has a headless browsing version, running automation scripts via Jenkins requires headless browser modes. It will work fine for chrome and firefox. If you want to run scripts on Edge via ...

View answer
Xpath is Unable to Locate Element.
1 votes

If you don't mind switching to CSS selectors, use the following: CSS selector: #nav-mobile .active a.dropdown-button.btn

View answer
Capturing http errors and customizing the message in webdriver
1 votes

You can capture console Logs using the following code snippets: For chrome only - LogEntries logEntries = _driver.manage().logs().get(LogType.BROWSER); List<LogEntry> logs = ...

View answer
How to pass char variable through sendkeys?
1 votes

Convert char to string and then pass it to the sendKeys function: supID.sendKeys(Character.toString(supName));

View answer
Drag and drop is not working with selenium 3.0 + chrome 65
1 votes

I was able to perform drag and drop using the following snippet: _js.executeScript("$(arguments[0]).simulate('drag-n-drop',{dragTarget:arguments[1],interpolation:{stepWidth:100,stepDelay:50}});", ...

View answer
Unable to click on dropdown element using for loop
1 votes

Since the tag name is select, try using the following: Select _select = new Select(driver.findElement(By.cssSelector("#idSbxPractice"))); try { _select.selectByVisibleText("OptionSelect"); } ...

View answer
Not able to click on the consecutive pages in an application
1 votes

You can use the following snippet: List<WebElement> pages= driver.findElements(By.cssSelector(".pager a")); driver.manage().window().maximize(); WebDriverWait wait = new WebDriverWait(driver, ...

View answer
How to enter OTP code for verification using Tellurium?
1 votes

aerogear-otp-java - Java One Time Password API provides insights about how an otp is generated. It worked for okta verification, you may try this with Tellurium and see if it works out. Here is the ...

View answer
Running selenium scripts on remote machine
1 votes

Maybe you could use selenium grid Selenium Grid Documentation Setting up Grid Your Machine == Hub PM's machine == Node

View answer
Clicking on a tab using selenium not working
Accepted answer
0 votes

Use this: WK = browser.find_element_by_xpath("//div[contains(@class,'createTeamTabTitle_') and text() = 'WK']") WK.click() BAT = browser.find_element_by_xpath("//div[contains(@class,'...

View answer
CLEAR Method skipped while running the tests
0 votes

You can use the following method to clear text fields, it is tested on different types of input fields public boolean clearTextField(Object locator) { _element = _query.castLocator(locator); ...

View answer
Mouse hover action to browser window close button
0 votes

I did it using Sikuli: //imports import org.sikuli.script.FindFailed; import org.sikuli.script.Pattern; import org.sikuli.script.Screen; //Code Snippets Screen s = new Screen(); Pattern ...

View answer
How to locate "Login" button of Flipkart bootstrap login page? I tried in many ways, but still unable to locate element
0 votes

xpath="//button[@type='submit']" => this will locate multiple submit type buttons on the webpage. //button@type='submit' => will locate nothing since there are no buttons of nth-child type 2 on the ...

View answer
Compare the date from a API key value in Postman
Accepted answer
0 votes

pm.test("Check birthday greater than 1988-18-01", () => { let date, isoFormatDate, a = new Date('1988-01-18').getTime(); for (i = 0; i < jsonData.content.length; i++) { ...

View answer
How to get the page size (content rendered) in selenium webdriver?
0 votes

You can use javascriptExecutor and use the window.innerWidth and window.innerHeight property. System.setProperty("webdriver.gecko.driver", "<path to gecko driver>") WebDriver driver = new ...

View answer
How to run all Selenium test cases via batch file
0 votes

In eclipse you can export your test cases as runnable java jars. and using the following commands create a batch file to run them sequentially/simultaneously- Sequentially: java -jar ...

View answer
How to locate an element which is inside the iframe?
0 votes

Working with Frames using Selenium WebDriver: This link might be helpful. Blockquote The element which i need to perform action is in the iframe itself, so do i need to use the driver.switchTo()....

View answer
Selenium WebDriver Drop Down List Testing With Div tag in java
0 votes

Executing a javascript click on the option from the dropdown should work, because for a javascript click to work elementToClicked should be present on the dom (it does not matter if its display is ...

View answer
Selenium - How to copy entire excel column without using iterator
0 votes

You may try jxl.Sheet.getColumn function of jxl.jar. Only catch is jxl does not support the "xlsx" file format.

View answer