Pega7 edge unable to accesa elements under frame - selenium

We are using edge 102 version
Selenium 4.1.2 we are able to switch to proper frame(pegagadget2ifr) in pega 7 application
But unable to access any elements under it. When we get findelements ,we are getting elements out side the frame. Same was happening with edge 101 too.

Related

Error: UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode

I have selenium Hub as a service on Cluster Kubernetes and I start testing remotely using selenium side runner. Unfortunately when I try to run a test with terminal (using Ubuntu), I get the following error:
enter image description here
UnsupportedOperationError: pointer movements relative to viewport are
not supported in bridge mode
at executeLegacy (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17)
at Actions.perform
(../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:971:16
if I try to start the tests from selenium ide, everything works well. What can the error depend on?
Can you help me? Thank you in advance.
Best regards
This error message...
UnsupportedOperationError: pointer movements relative to viewport are not supported in bridge mode
at executeLegacy (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:1129:17)
at Actions.perform (../../../../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/input.js:971:16
...implies that the pointer movement which happens relative to the viewport is not supported while working within a canvas in bridge mode.
As per the documentation in Clause 6 of Class Actions:
For W3C actions, move offsets relative to a WebElement are interpretted relative to the center of an element's first client rect in the viewport. For legacy actions, element offsets are relative to the top-left corner of the element's bounding client rect. When translating actions to the legacy protocol in bridge mode, an extra command must be inserted to translate move offsets from one frame of reference to the other. This extra command conributes to the overall latency issue.
You can find a detailed discussion in Is it possible to programmatically determine whether W3C action commands are used?
This is a known issue with Selenium and is being tracked through Not correctly move pointer to the position inside of element in bridge mode.
ChromeDriver - Implement Actions API
The currently released ChromeDriver 76.0.3809.12 contains the implementation of Actions API.
----------ChromeDriver 76.0.3809.12 (2019-06-07)----------
Supports Chrome version 76
Resolved issue 1897: Implement Actions API [Pri-1]
Link to Issue 1897: Implement Actions API
Switching to ChromeDriver 76.0 will solve your issue.
It could be due to selenium version. I faced the same issue and upgraded selenium version to 4.0.X.

Automate a react native Android application using selenium

I'm trying to inspect element on react native app
but unfortunately I could not find any element on it, I have use ui automator viewer and appium inspector.
Can anyone help me please?
I have no problem to inspect react native application with appium desktop, you can check article on Sauce Labs blog with pretty good details and iOS RN app/python example.
It's a bit tricky to uniquely identify UI elements, but still possible with setting unique accessibilityLabel for the View on RN side and search for it with AccessibilityId locator strategy in Appium.
Provide more details in case you need additional help.
Unfortunately, without having accessibilityLabel in Views of RN app, you are limited to use xpath locator and search by element text, like "//android.widget.TextView[contains(text(), 'Skip')]".
Avoid using strict #text= as it might not work for every element ,e.g. if text split in 2 lines on some device.

Selenium - Element not visible when the browser set to mobile responsive mode

I am testing the browser for mobile responsiveness. I changed the browser window size to iPhone 5 which is 320 x 568 using this command
driver.Manage().Window.Size = new Size(320, 568);
When I run the test, the browser opens fine according to the mentioned size without any issue. But it fails to find a hyperlink text which is displayed on the page. I get Element not visible exception when I could actually see the link text on the screen. So, could anyone help me solve this issue or have any ideas that I could try?
Any help would be highly appreciated.
Thanks.
Perhaps it's due to the time delay, that means code executes even before the link appears, So write the following code in your language
Code from Ruby Selenium-binding
wait = Selenium::WebDriver::Wait.new(timeout: 10) # seconds
wait.until { driver.find_element(id: "foo").displayed? }
driver.find_element(id: "foo").click
Try to scroll to the element.
You could use java script to do that.
In Python this can be done via
WebDriver.execute_script("arguments[0].scrollIntoView();", elem)
Some elements of the DOM of the webpage change when you test for mobile responsiveness, so selenium is unable to locate the element that you are specifically trying to target.So, you should try to debug and find the methods where the code is failing to perform the action.Then you should find the locators for those elements in "mobile responsiveness view" and trigger only those methods when you are testing for mobile.

webkit vs custom elements v2

is webkit trying to accomplish the same thing as custom elements v2 ?
https://webkit.org/
https://developers.google.com/web/fundamentals/getting-started/primers/customelements
If so will safari ever support custom elements? Apple dev's website claims they will, but then they reference 'webkit' and not 'custom elements'. This makes me worried that Safari 10.1 will still not run the 'custom elements' I programmed for my website. True or false?
https://developer.apple.com/library/archive/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_1.html
If safari will never support custom elements, does anyone know of a 'wrapper' or some way to write custom elements with one source-code base, but also have the website run on safari?
Why would google chrome today (march 28,2017), which supports custom elements, not render properly from iPad, but would work fine when using the browser from mac?
is webkit trying to accomplish the same thing as custom elements v2 ?
Webkit, Safari's Web engine, is trying to implement Custom Elements v1.
If so will safari ever support custom elements?
Yes, at least autonomous custom elements. For customized built-in elements you'll need a polyfill (see below).
does anyone know of a 'wrapper' ?
There are 2 polyfills availables.
Why would google chrome today [...] not render properly from iPad ?
Maybe you version on Chrome or OS X is too old. Maybe you can update them.

Getting different height and width in different browser using selenium webdriver

This is the code for getting the Dimension.
Dimension countrypickerDim = countryelement.getSize();
Results
IE
Height =24
Width =94
Firefox and Chrome
Height=24
Width =96
i talked with developers and they are saying that they are using the Google Fonts so results will be deffer on different browser.
Please let me know how to deal with that.
Update your test accordingly, it's the "desired" behavior, IE is hell, nothing you can do with that.
The simplest method: switch-case for different browsers that assert the dimension according to the browser you working on.