Someone mentionned me sikuli http://sikuli.org/ seems great.
I just try to go to yahoo with google chrome and it fails to paste the url at step 6 why ?
If you perfrom a mouse click on the textfield with www.google.com in it, it will be marked with blue and so the picture changes. This means that the paste operation will fail because it cant find the picture in your screen.
In this case it would be better to just skip the image and paste it directly after the mouse click.
find("icon.png")
click("icon.png")
wait("textfield.png")
find("textfield.png" )
click("textfield.png" )
paste("yahoo.com")
type(Key.ENTER)
Hope this solves your problem.
i believe that the image of "www.google.com" text had changed after the click operation,either the text getting highlighted or inserting a cursor image.
try to remove the click
Related
I can't find any way to click "Save" on a pop up that spawns during a test. TestCafe needs to click the "Save" button so I can obtain the CSV file.
I've tried searching for a way to do this in the docs but the closest thing I found so far is .pressKey('enter'). However, this fails to click 'Save' and I don't know what other options I have.
Screenshot of exactly what I'm trying to click:
enter image description here
I provided the end of my code (you'll have to assume all the prior parts of a TestCafe test are preceeding this:
.click(export_button)
.click(csv_pill)
.wait(3000)
.pressKey('enter')
I expect to somehow be able to have the mouse detect this 'Save' button and it clicks it to save this CSV file.
TestCafe cannot test native browser dialogs. They should be prevented. If you encountered this behavior during the test, please create a bug report with a simple example page or link to a tested site.
I'm relatively new to Cocoa application. In my application (MacOS), I already mark the text if it contains image url link. What I'm trying doing now is that when the mouse hover (without clicking) on the link, the application will open an NSPanel (sorry, if it's inaccurate) and show the content of the image url. Also, the panel/window will be closed automatically when mouse move out of the text.
I've tried something such as "floating window/panel/quicklook", but the search result isn't close to what I want. Could anyone please give me some keywords so I can try to find the solution by myself? Thank you.
Hope you guys doing great. I want to capture whole screen of website (from top to bottom) but failed. It is a parallax site template with sticky navbar and when i try to capture screen it actually repeat background images and sticky navbar.
What i tried so far:
fireshot, iweb2.0, Chrome and Mozilla's built in screenshot plugin.
Thanks in advance.
Did you try to use windows Screen Capture ?
All you have to do is press
ALT + Prnt Scrn
keys together. It will help you to take screenshot of your Active Screen then go Paint and use Paste so you can easly do any editing you like.
If your page is longer then one page I suggest you to use Print to File (as PDF or XPS).
Now you have a full webpage in your hand now all you have to do is Export it to jpg or png.
I hope I understand your question properly and answered your question.
I have an old OAUTH1 project with a cliend id for web application. The problem is that I can't set redirect URIs. If I update them at https://console.developers.google.com/project/myprojectid/apiui/credential everything seems to be fine. But when I press F5, all the settings are gone. It seems as if Google doesn't store my settings. I have tried it with various browsers but still didn't work.
Has anyone else encountered this problem? Help is highly appreciated.
Actually pressing Save twice don't work (at least for me).
Instead, I have to hit enter into textbox. This adds entry into the list.
And only after that clicking Save will save the changes.
Type the redirect URL and press ENTER.
It will get added as a row.
Then click save.
Bad UI Google :( wasted some time trying to figure this out.
I think this is just an example of poor UX design. I was having the same problem, I would add a redirect URI, click the 'Save' button, see it add a new line, and assume it was saved.
I discovered that the first click of the 'Save' button only creates a new line. You have to click the 'Save' button a second time (where it will briefly change the text and color to 'Saving...'), which will save your updates and return you to the previous screen.
Step 1: Enter the URI
Step 2: click 'Save'
Step 3: Click 'Save' again
Authorized redirect URIs not saving. Because of the browser. Please change browser to Google chrome or chromium which developed by google so we can save it. I faced this problem it has eat the time for my whole day.If changed browser still not working fine, then try to clear everything(history, cache, .....) from the browser.
I'm trying to find the location of some text on a web page using Selenium.
I can use the isTextPresent function to tell me if the text occurs, but then I want to know where it actually is.
The wider problem is that I want to click on this text.
The problem is that I don't seem to be able to click on this text, which I think is in some control embedded on the page. So, it doesn't seem to be detected as a link or button or option etc. However, I need to click on it to make a selection.
Any thoughts?
Your solution xpath=//*[text()='hello'] will click the first clickable element with the text "hello" in the source code. If you want to be more specific, you can add more cases to the xpath like this
xpath=//*[#id='exampleId']//*[text()='hello']
Now this will click element with text 'hello' that's found after some element with id 'exampleId'.
Xpath is great usage and you should answers above. However, I realised, that sometimes Selenium does not allow you to click something, because it thinks the text is hidden by CSS
So far I do not have any workaround for it and instead of clicking a button I am closing completly whole browser window.
But in my case its div hidden by CSS showing actual version number of such application. So I only take a screenshot of it:
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
File destination = new File("path/to/outputfiles/versionNumber.png");
FileUtils.copyFile(scrFile, destination);
Got it !
I don't know the answer to how to find the location,
but, the more important bit is to click on that text.
I can just use an XPath locator in the click method, like :-
Click(xpath=//*[text()="hello"])
This will click on the element that has a text value of "hello".
In my case, this is unique, so that's specific enough.
${x_axis}= Get Horizontal Position xpath=//*[text()="Log files"]
Get Horizontal Position returns the position of 'Log files' wrt the left end(X-axis length).
the position is an integer value... so can be compared easily as well.