workflow "action menu" popup in Oracle webcenter content(WCC aka UCM) do not show-up in correct position. - webcenter

workflow "action menu" popup in Oracle webcenter content(WCC aka UCM) on the workflow queue page do not show-up in correct position.
When clicked on the action menu, the popup shows in front of the icon(i.e. at right position ) but when i scroll down the window and click on the action menu, it shows above its place. I have called the standard include .
I think, one way to resolve this is to override this standard include with super i.e. and then customizing the position of the popup.
If this is bug with WCC, then is there is any workaround rather than to go for solution above.
" style="vertical-align:middle">
text-align:center">
" title="" src="" height="16" width="16" border="0" onclick="showPopup('popup__', 'actIcon_', event);">
<$AllowReview=1, ShowWorkflowStepInfo=1, AllowCheckin = "", AllowCheckout = "", IsStaging=""$>
<$if isTrue(dIsCheckedOut)$>
<$AllowReview=""$>
<$if dCheckoutUser like UserName$>
<$AllowCheckin=1$>
<$endif$>
<$elseif not dDocTitle$>
<$AllowReview="", AllowCheckout=1$>
<$elseif strIndexOf(#active.dWfStepType, ":C:") > -1$>
<$AllowCheckout=1$>
<$endif$>
<$if strEquals(#active.wfQueueActionState, "APPROVE")$>
<$AllowReview=""$>
<$endif$>
<$if AllowReview and dWfStepType and strIndexOf(dWfStepType, ":R:") < 0
and ((not isTrue(#env.AutoContributorAllowsReview) or
strIndexOf(dWfStepType, ":CA:") < 0))$>
<$AllowReview=""$>
<$endif$>
<$if dProjectID$>
<$IsStaging=1$>
<$endif$>
<$include workflow_action_popup$>
</td>

If you think it is a bug, I would open an Oracle SR.
However, it might just be easiest to simply fix it yourself.

Related

How to click on the center of the button using selenium java? Which position of the button is actually getting clicked when button is identified?

I have button in our website, and border areas of the button is not clickable. So, i need to make sure the button is getting clicked at the center. Is it possible via selenium?
I tried using coorinates, but it is not recommended for our scenario.
xpath used : //div/button[#id='clickme']
<div class="col-lg-10 col-sm-12 p-0 pt-4">
<button class="click mb-3 " tabindex="0" id="clickme">+ Click Here</button>
</div>
Java code used to click
WebElement button = driver.findElement(By.id("clickme"));
button.click();
I guess the click is happening sometimes[2 out of 10 times] on the border where it is not clickable(hand symbol not shown) . As a result report says the click action happened, but there is no event fired on the website.
To identify the element with text as Click Here you can use either of the following Locator Strategies:
cssSelector:
"button.click#clickme"
xpath:
"//button[contains(#class, 'click') and #id='clickme'][contains(., 'Click Here')]"

Bigcommerce Add To Cart Pop-Up

When using bigcommerce before, we were able to choose whether or not to have a pop up or take the user to the cart whenever they clicked the "Add to Cart" button. Does anybody know if this feature has been taken out by BigCommerce or where I can find that setting now? Thank you!
Do you know if you're using the Stencil or Blueprint framework?
If you're using blueprint, you can go to "Store Setup > Store Settings > Display" and choose "Take Them to Their Shopping Cart".
If you're using stencil, that feature is hidden and you have to do customization for it to work. If your products don't have any options, you can follow the instructions on this page: https://support.bigcommerce.com/articles/Public/How-can-I-add-a-product-to-the-cart-with-a-link/#add-to-cart.
However, if you have options, this won't work because it doesn't updated the sku in the url. What i did to get this to work was to edit the product-details.js
First you need to download the theme in order to edit the js file. Then, starting on line 234, you'll see the following code:
// Open preview modal and update content
if (this.previewModal) {
this.previewModal.open();
this.updateCartContent(this.previewModal, response.data.cart_item.hash);
} else {
this.$overlay.show();
// if no modal, redirect to the cart page
this.redirectTo(response.data.cart_item.cart_url || this.context.urls.cart);
}
Directly under the comment, add /* and then go down one line under the closing brace of the else statement (}) and add */ to close the long comment. The code will now look like this:
// Open preview modal and update content
/*
if (this.previewModal) {
this.previewModal.open();
this.updateCartContent(this.previewModal, response.data.cart_item.hash);
} else {
this.$overlay.show();
// if no modal, redirect to the cart page
this.redirectTo(response.data.cart_item.cart_url || this.context.urls.cart);
}
*/
this.redirectTo(response.data.cart_item.cart_url || this.context.urls.cart);
Let me know if this helps!
Just FYI I went through a similar problem and found that the "Ask a Design partner" forum gave me my answer. The answer I used was from this post:
https://support.bigcommerce.com/s/group/0F913000000HLpWCAW/ask-a-design-partner
But to help I will pull out what they said:
"If you want to remove the popup, you will need to edit the theme files, navigate to the templates/components/products/product-view.html file, and comment out (or remove )this code at the bottom of the file:
<div id="previewModal" class="modal modal--large" data-reveal>
<a href="#" class="modal-close" aria-label="{{lang 'common.close'}}" role="button">
<span aria-hidden="true">×</span>
</a>
<div class="modal-content"></div>
<div class="loadingOverlay"></div>
</div>
Hi You need to do this :
1. Login to admin-end then go to store setting
2. From top tabs choose display tab
3. Find the 'Add to Cart' Action choose what you want pop window or redirection to the cart page.
4. hit the save button.
Check image:
Thanks

Selenium: Click on element in div container doesn't work

Fyi: I'm using the selenium package for R, the selection code is equal to javascript or python so I'm asking a general selenium question.
I have a container which I have to make visible by a click, this works.
Then I try to select an element inside this container, I think I find it correctly but the click on the element only makes the popup window disappear.
Example code:
<div class="dateRanges" style="top: 275.313px; display: block;">
<a class="top dateOption CUSTOM" id="id32" href="javascript:;">
Benutzerdefinierter Zeitraum
</a>
<a class="dateOption TODAY" id="id33" href="javascript:;">
Heute
</a>
...
</div>
Element I try to find is "top dateOption CUSTOM".
My different tries which all failed:
remDr$findElement(using = 'xpath','//a[contains(#class,"top")]')$clickElement()
remDr$findElement(value = '//a[#class = "top dateOption CUSTOM"]')$clickElement()
remDr$findElements(using = 'css selector','a[class="top dateOption CUSTOM"]')[[1]]$clickElement()
I don't get any error message, the click seems to happen as the popup disappears, but the effect of the button does not.
I tried to save the object, wait a few seconds and click afterwards with no different effect.
I also tried different approaches with "idc4" with the same outcome.
Would appreciate any help, thank you.

Watin AttachTo popup window

We are using Watin to automate the website testing and try to implement the following: Click on a button to bring up popup, click on the Generate button on the popup window to generate file. We wasnt able to get the popup window using watin. ERROR: "Could not find an IE window matching constraint: Attribute 'href' matches 'Regenerate'. Search expired after '30' seconds." Please give a hint on what has gone wrong. Your help would be much appreciated.
The code snippet as below:
ieInstance.Button(Find.ByName(Button1)).Click();
ieInstance.WaitForComplete();
var popupUrl = new Regex("Regenerate");
//part of popup URL: "RegenerateDialog.aspx?Type="
var popupBrowser = Browser.AttachTo<IE>(Find.ByUrl(popupUrl));
if (popupBrowser != null)
popupBrowser.Button(Find.ById("RegenerateDialogBtn")).Click();
The popup window code as below:
function ShowEXPFileWindow(Type)
{
//do some stuff
var oWnd = window.radopen("RegenerateDialog.aspx?Type=" + Type, "RegenerateDialog");
oWnd.set_title("");
oWnd.center();
}
HTML to bring up popup window:
<td><input type="submit" name="ctl00$Body$ConfigRadGrid" value="Regenerate" onclick="ShowEXPFileWindow('OD'); return false;" class="submit" /></td>
Instead of
ieInstance.Button(Find.ByName(Button1)).Click(), use
ieInstance.Button(Find.ByName(Button1)).ClickNoWait()
and check. Is it possible to post the image of the pop-up window? or when you click on button, which control is selected by default? If it is 'Regenerate' then try to press 'Enter' Key and check.
Is the pop window is another IE window? If yes, then attach it using
Find.ByUrl(url => url.Contains(expectedURL))

choose file box by clicking on image ? (not with browse button)

is it possible to show "choose file" window, when i click on some image ? i want to hide that input and browse button, which shows when i type
thanks
Long answer: Yes, you absolutely can. Get ready for some Javascript/CSS haxx that I cooked up. First the Javascript:
function getFilePathFromDialog() {
document.getElementById('fileBrowser').click();
document.getElementById('filePath').value = document.getElementById('fileBrowser').value;
}
Now the HTML:
<img src="path/to/image.jpg" onlick="getFilePathFromDialog();">
<input type="text" id="filePath" name="filePath" /><br />
<input type="file" id="fileBrowser" name="fileBrowser" style="visibility:hidden; display:none;" />
Basically all this does is hide the actual file dialog input field from view. When you click on your image it will fire the file dialog's click event. When the user chooses a file and clicks "Open", it will put the file path selected in the textbox called "filePath".
No, because of security restrictions in the browser. You have to go with Flash or Java to achieve that.