Hi All
I am testing chrome/safari on real device (Android/iOS).
I am using Ranorex Studio 8.3 and Appium Desktop 1.14.0
At the "1st tab", Click on an item -> Open "2nd tab"
after opening 2nd tab, I think appium is handling on 1st tab
Result: auto switch on "1st tab"
I cannot run the script for the "2nd tab"
How to close "1st tab" or be controllable "2nd tab"
Please help me!
Regard,
quynhnt
How to close tab on Browser native (Chrome/Safari)
How to close tab on Browser native (Chrome/Safari)
You do not have the required permissions to view the files attached to this post.
Re: How to close tab on Browser native (Chrome/Safari)
Hi,
The problem is most probably caused by xpaths, which are not optimized for second tab? I guess the same issue will happen if you run your script on desktop? Could you please post an example of failing xpath, you are using in repo?
You see, if the xpath returns more than one element, Ranorex always uses the first element from the list of found elements. And because both tabs contains the same elements, your xpath most probably returns multiple elements from both tabs. What you can try is to add @visible attribute to xpath of DOM element. With this, Ranorex should return only elements from visible tab... Hope this helps?
The problem is most probably caused by xpaths, which are not optimized for second tab? I guess the same issue will happen if you run your script on desktop? Could you please post an example of failing xpath, you are using in repo?
You see, if the xpath returns more than one element, Ranorex always uses the first element from the list of found elements. And because both tabs contains the same elements, your xpath most probably returns multiple elements from both tabs. What you can try is to add @visible attribute to xpath of DOM element. With this, Ranorex should return only elements from visible tab... Hope this helps?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How to close tab on Browser native (Chrome/Safari)
Hi odklizec
Thank your information
The problem does not arise on the desktop
On mobile device.
Ranorex controls the mobile browser via appium web driver.
After opening a new tab, I think appium keeps the session with the old tab.
So automatically back to the old tab.
I did the following experiment
1. In the appium server running state.
I tried swicht to the new tab manually touch operation.
However, after switching to a new tab, it will automatically back to the old tab.
2. In the appium server off state.
It did not happen automatically switch back on the old tab.
---
After opening a new tab I want ranorex active on a new tab.
I want to close the old tab and keep the new tab.
I used the CloseWindow, however it closed all tabs.
Is there any way to close any tab in mobile device's browser?
Please help me
Regard,
quynhnt
Thank your information
The problem does not arise on the desktop
On mobile device.
Ranorex controls the mobile browser via appium web driver.
After opening a new tab, I think appium keeps the session with the old tab.
So automatically back to the old tab.
I did the following experiment
1. In the appium server running state.
I tried swicht to the new tab manually touch operation.
However, after switching to a new tab, it will automatically back to the old tab.
2. In the appium server off state.
It did not happen automatically switch back on the old tab.
---
After opening a new tab I want ranorex active on a new tab.
I want to close the old tab and keep the new tab.
I used the CloseWindow, however it closed all tabs.
Is there any way to close any tab in mobile device's browser?
Please help me
Regard,
quynhnt