question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Matched JSONWP error code 7 to NoSuchElementError

See original GitHub issue

The problem

Hi, I tried in our project switch to UiAutomator2 from default Appium automation engine. Main reason why we decide to do this, were issues here on git, where some commiters writed that UIAutomation2 is more stable then Appium automation engine. Now with UiAutomator2 i have problem, that i can’t call .FindElement() on another element to find his son element. Or at least I think that this is a this problem. Can you look on this two logs and say what can be wrong?

If you need additional resources for investigation, do not be afraid to write me.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.8.1
  • Desktop OS/version used to run Appium: Win 10
  • Node.js version (unless using Appium.app|exe): .exe (1.6.2)
  • Mobile platform/version under test: And 7 (API 24)
  • Real device or emulator/simulator: emulator
  • Appium CLI or Appium.app|exe: .exe

Link to Appium logs

Log of function test with Appium automation engine: https://gist.github.com/MioOgbeni/50b11441dd4c1bff031bd0721c7c07a6

Log of non-function test with UiAutomator2: https://gist.github.com/MioOgbeni/9a5fc62351ebb80717fef8ee8688944b

Code To Reproduce Issue [ Good To Have ]

        [FindsBy(How = How.XPath, Using = "//android.support.v7.widget.RecyclerView[@index='0']/android.widget.LinearLayout")]
        private IList<IWebElement> Rows { get; set; }

        public List<SettingPageRow> RowList = new List<SettingPageRow>();

        public void FindRows()
        {
            if (!AmIOnSettingPage()) return;
            RowList.Clear();
            foreach (var item in Rows)
            {
                var row = new SettingPageRow();
                try
                {
                    row.Value = item.FindElement(By.Id("summary"));
                }
                catch
                {
                    row.Value = null;
                }

                try
                {
                    row.CheckBox = item.FindElement(By.Id("switchWidget"));
                }
                catch
                {
                    try
                    {
                        row.CheckBox = item.FindElement(By.Id("checkbox"));
                    }
                    catch
                    {
                        row.CheckBox = null;
                    }
                }

                try
                {
                    row.Text = item.FindElement(By.Id("title"));
                }
                catch
                {
                    row.Text = null;
                }

                RowList.Add(row);
            }
        }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
lock[bot]commented, Feb 28, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoSuchElementError from appium response when the ...
NoSuchElementError from appium response when the element is visible and ... [debug] ^[[35m[MJSONWP]^[[39m Matched JSONWP error code 7 to NoSuchElementError
Read more >
appium/appium - Gitter
elementID: 105553169569744.22 [debug] [JSONWP Proxy] Got response with status 200: ... [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError.
Read more >
Unable to locate element in appium/python - Stack Overflow
... element found"} [AndroidBootstrap] Received command result from bootstrap [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError ...
Read more >
appium 在运行 Java 脚本时 eclipse 报 An element could not ...
[MJSONWP] Matched JSONWP error code 7 to NoSuchElementError ... [UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
Read more >
在查找元素时,appium报错UnexpectedAlertOpenError后 ...
Matched JSONWP error code 7 to NoSuchElementError [info] e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session/57bc791a-b528-4…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found