Can someone please tell me how to get this menu that appears after highlighting this part of the string as seen in this picture I'm including? I'm setting up vector icons for my app using react native cli. Your help will mean the world.
Not sure if the picture link works, but basically after writing this string in the app.js file of my app, he highlights "AntDesign", which then bring a little dropdown menu with an option to "Insert "import AntDesign from 'react-native-vector-icons'" Here is the string that I typed out:
<AntDesign name={"stepforward"} size={30} />
Again, he then highlights "AntDesign" which brings up a dropdown menu with that option mentioned above. I do not get this.
enter image description here
Related
I am implementing Material Tap target prompt library to make a tutorial screen. I want to focus on my spinner, this is my code:
new MaterialTapTargetPrompt.Builder(MainActivity.this)
.setTarget(spin_01)
.setPrimaryText("Welcome")
.setSecondaryText("You can select the bill type by clicking here")
.setPromptBackground(new RectanglePromptBackground())
.setPromptFocal(new RectanglePromptFocal())
.show();
This is my output:
enter image description here
As you can see, unlike the examples shown in the documentation page, my focused element has a complete white foreground. How do I resolve this issue? Please help me.
The website has standard image which i can use to identify the xpath.
but i want to click on the third image which contains specific text only.
the picture is beside the image, it that fine to have img and text in one command line?
Original working code:
driver.findElement(By.xpath("(//img[#class='s-image'])[2]")).click();
Try to insert the contains command but it does not work:
driver.findElement(By.xpath("(//img[#class='s-image'])[2] and contains(text(),'Apple MacBook Pro')")).click();
You have tried wrong option that is not text that is alt property to get into xpath.Try now.
driver.find_element_by_xpath("(//img[#class='s-image'][contains(#alt,'Apple MacBook Pro')])[2]").click()
OR
driver.find_element_by_xpath("(//img[#class='s-image'][starts-with(#alt,'Apple MacBook Pro')])[2]").click()
I am doing an automation for a website and I have this drawer Menu Panel that I want to open verify some elements in it then close it or hide it.
I am stuck now while trying to close/hide this drawer.
However, in the HTML I found this when it opens:
"is-visible" added to class name
Tag aria-hidden="false And when its closed/hidded"
"is-visible" removed from title
Tag aria-hidden = true
Here is the code for login and then open Menu and check Logout is displayed
login.SuccessfulLogin(testdata);
login.clickLink(By.xpath(testdata.getParam("MenuLocator")));
login.WaitForElementVisibilty(By.xpath(testdata.getParam("loginLocator")));
login.compareValue(testcase, "", expectedResultMap.get("MenuLoginTxt"),
driver.findElement(By.xpath(testData.getParam("loginLocator"))).getText());
// here should enter the code to close the menu!
log.info("User Logged in Successfully");
See screenshot
(Menu opened on the Left-side & HTML code highlighted on Right-side)
Website you are checking is accessible from network so i checked how it works. You just need to click outside of menu area. Correct element is div.mdl-layout__obfuscator.
Using java you can do this like this:
driver.findElement(By.cssSelector(".mdl-layout__obfuscator")).click();
Note: there is only one element with this class name on this page so this is sufficient. You can use any other selector type, not necessarily css selector.
I got a webengage or clickdesk alert popup but that is intermittent, so I can't check everytime or wait for it to load, everytime I enter a new webpage because that would make my test case run very slow. Is there any workaround for it ( may be blocking it).
For WebEngage, all you got to do is call the respective clear() methods for the products being used on the site (to get rid of the corresponding UI components), as underneath:
webengage.feedback.clear();
webengage.notification.clear();
webengage.survey.clear();
However, this would only work when WebEngage has loaded on the page. If you'd like to completely disable loading of WebEngage products, insert this code in head tag of the page you are testing:
var window._weq = {};
_weq['webengage.defaultRender'] = false;
You can do a lot more cool stuff like the above using our JavaScript API: http://docs.webengage.com/api/js-api-v-4.0.html
Avlesh | CEO, WebEngage
If you are using ClickDesk on your website and would like to delete the Proactive rules which pop up the chat window randomly, then these can be deleted or edited to change the frequency from this link on your ClickDesk Dashboard - https://my.clickdesk.com/#proactive.
In case, you do not want the chat widget to show up at all until clicked on a text link or an image link then, you can add our Custom image link or text link code on your website, this would enable the chat widget only when clicked on it. You can find this link here - https://my.clickdesk.com/#departments/default.
If you have further questions or concerns with regards to ClickDesk, you can visit our website www.clickdesk.com and chat with one of our agents online.
Thanks
Mike Evans
ClickDesk Corporation
My main goal: When i click the link, a new browser window should be opened and displays the content of entire log file. And the window should not have an address bar and navigation buttons (Back, Forward).
Is there any approach to do this in Spring-MVC project?
Here is what i am doing now:
When i click the link, the controller will be called with a parameter logName.
Now the controller have access to get any kind of details of the log file like content, path, etc... I am setting all these details to an object and sending back to JSP.
Here i am not sure how to open a new window and display the content of the log file in that window.
Please suggest me an approach on this!!
It would be very helpful for me if you can share me with some examples...
Spring or JSP have nothing to do with it, the only way to force user's browser to open a link in a new tab is to use client-side Javascript. window.open() allows configuring the popup to hide certain interface elements (see all options in the documentation)
Your code would look something like:
<input type="button" value="Show Log" onclick="showLog(logName)">
function showLog(logName) {
var url = "/path-to-your-controller.html?logName=" + logName;
window.open(url, "LogPage", "toolbar=no,location=no,menubar=no");
}
However, I don't think using a customised browser popup is a good solution; it's been disappearing from the web for a reason. It would be more elegant to fetch raw data using AJAX and display it in a JS popup: it wouldn't interfere with user's page navigation (you tagged the question with jQuery, you could use jQuery UI for that).
What is more, I wouldn't be surprised if window.open wasn't supported by all browsers in the same way† - something to keep in mind if you're targeting a wider audience.
† seems that Chrome ignores location=no, for instance