Answered

Ability to Zoom Web Page Out

Hi,

I was wondering if there was either a Sub7 command or a java script that would allow me to zoom the UI out from 100% to 80%. The elements cover each other when the browser is at 100% and therefore the script keeps failing since the filter element is partially covered.

Browser: Edge; Version 113.0.1774.50

0
15 comments
Avatar
Joseph Hamdan

Hi Zach,

Sure, can you try using the below code in Execute_JavaScript command?

document.body.style.zoom='80%'

When you execute, the zoom changes, but the browser may not show any difference here:

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Joseph Hamdan

Hi Zach,

Emails sent to a No-Reply email will not be posted here, so we are unable to see them. We appreciate if you could respond directly on the forum so we can see your responses. Thanks!

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Zach Schwantes

Hi,

I tried this short code below previously (yesterday) and again today…unfortunately no luck. Though it makes the element more visible I get the following message, and it will not click on either element. I think the reason for this is the script is only zooming out on the body of the html. When I manually zoom out 20% of the entire UI, the script works perfectly. However, I have not been able to write a script to execute this particular function.

Self-healing procedure was triggered because of issue with direct usage of Selenium API

XPath: "(//oj-select-one[contains(@value, 'filter')]/div/div/a)[3]" was used

Element One

(//oj-select-one[contains(@value, 'filter')]/div/div/a)[3

Element Two

(//oj-select-one[contains(@value, 'filter')]/div/div/a)[4]

Thanks,

Zach

0
Comment actions Permalink
Avatar
Joseph Hamdan

Hi Zach,

If app is publicly accessible, would you be able to provide the test case name and step number so we can inspect this?

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Zach Schwantes

Yup, it is not publicly accessible.

0
Comment actions Permalink
Avatar
Joseph Hamdan

Hi Zach,

Would you be able to show a brief image of how the browser window looks before and after zooming out manually?

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Zach Schwantes

100% Zoom Part 1



100% Zoom Part 2


|

 

80% Zoom Part 1


0
Comment actions Permalink
Avatar
Joseph Hamdan

Hi Zach,

If the above is from Chrome, is the same rendered on Edge and Firefox ?

Regards,
Subject7 Team

0
Comment actions Permalink
Avatar
Zach Schwantes

Hi Joseph,

The above screenshots are rendered from Edge, which is standard for all of our testing.

Thanks,

Zach

0
Comment actions Permalink
Avatar
Rex Feizi

Zach, 

This appears to be an application issue/bug as it doesn't render properly at the Standard Zoom Level (100%). Joseph's intention in asking about the application's rendering-behaviour in other browsers is to determine if the developers of the app (presumably Oracle) are aware of the issue and whether they have a workaround available.

Could you please help us by checking if the application renders correctly on other browsers such as Chrome, Firefox, and/or Safari?

Thank you!

--Rex

0
Comment actions Permalink
Avatar
Zach Schwantes

Hi Rex,

I have checked Chrome as well and it does the exact same thing. We only have Edge and Chrome on our work laptops so I can only check with those two browsers.

Thanks,

Zach

0
Comment actions Permalink
Avatar
Rex Feizi

Hi Zach, 

What exactly are you trying to do? Are you trying to interact with the elements that are on top of one another at zoom level 100%. 

If so, you can use Javascript to interact with them as a workaround. This is NOT recommended for a variety of reasons but given that an application issue is pushed to automation and you need a resolution, I am providing this as a workaround until the actual issue is resolved. 

Hope this helps for a temporary solution: 

For example, if you want to click on an element on an HTML page with id= hello you can do:
document.getElementById("hello").click();

Or if you want to fill a field with ID=hello with the value Bonjour you can do the following and I am adding an example to find elements by XPath using Javascript: 

// Find the input field element using XPath const inputField = document.evaluate('//input[@id="hello"]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

// Set the value of the input field
inputField.value = 'Bonjour';

 

0
Comment actions Permalink
Avatar
Zach Schwantes

Hi Rex,

You are right on; I am trying to interact with elements that are unfortunately overlapped. I don't think I can reasonably use the ID as they are the same in this situation, but I might be able to use your second temporary solution you mentioned. Additionally, I will work with my developers to get this fixed.

Thank you,

Zach

0
Comment actions Permalink
Avatar
Rex Feizi

Please let us know how it goes, always great to hear if a workaround actually helps. 

Thanks

--Rex

0
Comment actions Permalink
Avatar
Zach Schwantes

Hi Rex,

I was unable to get this workaround to work with those two filter elements. Though, to make sure I was doing it correctly I tried using it on a few other elements that were nearby and those worked.

Thanks,

Zach

0
Comment actions Permalink

Please sign in to leave a comment.