How can I locate inline elements from a web page using Selenium Webdriver

0 votes

Below is my code:




driver.findElement(By.cssSelector("#yDmH0d > c-wiz > div > div > c-wiz > div > div > ul:nth-child(3) > li:nth-child(4) > a > span.MrEfLc")).click();

While executing this code below error I got:

Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#yDmH0d > c-wiz > div > div > c-wiz > div > div > ul:nth-child(3) > li:nth-child(4) > a > span.MrEfLc"}

  (Session info: chrome=77.0.3865.75)

For documentation on this error, please visit:

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
Driver info:

Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 77.0.3865.75, chrome: {chromedriverVersion: 77.0.3865.40 (f484704e052e0..., userDataDir: C:\Users\Falgu\AppData\Loca...}, goog:chromeOptions: {debuggerAddress: localhost:56324}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}

Session ID: 10bfd87d03f811fc59fac13b1832bf08

*** Element info: {Using=css selector, value=#yDmH0d > c-wiz > div > div > c-wiz > div > div > ul:nth-child(3) > li:nth-child(4) > a > span.MrEfLc}

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(

at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(

at org.openqa.selenium.remote.HttpCommandExecutor.execute(

at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(

at org.openqa.selenium.remote.RemoteWebDriver.execute(

at org.openqa.selenium.remote.RemoteWebDriver.findElement(

at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(

at org.openqa.selenium.By$ByCssSelector.findElement(

at org.openqa.selenium.remote.RemoteWebDriver.findElement(

at abcd.HandlingInlineElements.main(

I have tried Xpath as well. But it is showing error.

Sep 18, 2019 in Selenium by anonymous
• 140 points

edited Sep 18, 2019 by Omkar 2,400 views

1 answer to this question.

0 votes

Which specific element you are trying to click on page? Because your element with xpath 


isn't visible on the page.

answered Oct 10, 2019 by Abha
• 28,040 points

Related Questions In Selenium

0 votes
1 answer

How can I locate web elements from a web page using Selenium Webdriver?

Hey @Dushyant, Locating elements in WebDriver is ...READ MORE

answered May 29, 2019 in Selenium by Shreya
0 votes
1 answer

How can I scroll a web page in Mozilla Firefox using Selenium?

Hi Rohan, steps to scroll a webpage in ...READ MORE

answered May 14, 2019 in Selenium by Pratibha
• 3,690 points
0 votes
1 answer

How can I select an option from a dropdown using Ruby Selenium Webdriver?

Hey Swasti, you can try following lines ...READ MORE

answered Aug 26, 2019 in Selenium by Anvi
• 14,150 points
0 votes
1 answer

How can I download the *.jar file from http:// using selenium WebDriver?

For Selenium Standalone Server use this: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); and ...READ MORE

answered Apr 9, 2018 in Selenium by Martin
• 4,330 points
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

How can I select date from a datepicker div using Selenium Webdriver?

Hey Jeevika, you can use following automation ...READ MORE

answered Jul 15, 2019 in Selenium by Abha
• 28,040 points
0 votes
1 answer